Fix preflight border color fallback (#7288)

This commit is contained in:
Jordan Pittman 2022-02-01 11:27:42 -05:00 • committed by GitHub
parent fb14b2d561
commit 75ba4e0f8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 1 deletions

View file

@ -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
View 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;`)
})
})