Skip to content

Commit

Permalink
Fix preflight border color fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
thecrypticace committed Feb 1, 2022
1 parent fb14b2d commit e59dc7f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/css/preflight.css
Expand Up @@ -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,
Expand Down
21 changes: 21 additions & 0 deletions tests/preflight.test.js
@@ -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;`)
})
})

0 comments on commit e59dc7f

Please sign in to comment.