Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/css/preflight.css
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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;`)
})
})