Fix preflight border color fallback (#7288)
This commit is contained in:
parent
fb14b2d561
commit
75ba4e0f8f
2 changed files with 22 additions and 1 deletions
|
|
@ -9,7 +9,7 @@
|
|||
box-sizing: border-box; /* 1 */
|
||||
border-width: 0; /* 2 */
|
||||
border-style: solid; /* 2 */
|
||||
border-color: theme('borderColor.DEFAULT', 'currentColor'); /* 2 */
|
||||
border-color: theme('borderColor.DEFAULT', currentColor); /* 2 */
|
||||
}
|
||||
|
||||
::before,
|
||||
|
|
|
|||
21
tests/preflight.test.js
Normal file
21
tests/preflight.test.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { run, html, css } from './util/run'
|
||||
|
||||
it('preflight has a correct border color fallback', () => {
|
||||
let config = {
|
||||
content: [{ raw: html`<div class="border-black"></div>` }],
|
||||
theme: {
|
||||
borderColor: ({ theme }) => theme('colors'),
|
||||
},
|
||||
plugins: [],
|
||||
corePlugins: { preflight: true },
|
||||
}
|
||||
|
||||
let input = css`
|
||||
@tailwind base;
|
||||
@tailwind utilities;
|
||||
`
|
||||
|
||||
return run(input, config).then((result) => {
|
||||
expect(result.css).toContain(`border-color: currentColor;`)
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue