Skip to content

Commit 75ba4e0

Browse files
Fix preflight border color fallback (#7288)
1 parent fb14b2d commit 75ba4e0

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

src/css/preflight.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
box-sizing: border-box; /* 1 */
1010
border-width: 0; /* 2 */
1111
border-style: solid; /* 2 */
12-
border-color: theme('borderColor.DEFAULT', 'currentColor'); /* 2 */
12+
border-color: theme('borderColor.DEFAULT', currentColor); /* 2 */
1313
}
1414

1515
::before,

tests/preflight.test.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { run, html, css } from './util/run'
2+
3+
it('preflight has a correct border color fallback', () => {
4+
let config = {
5+
content: [{ raw: html`<div class="border-black"></div>` }],
6+
theme: {
7+
borderColor: ({ theme }) => theme('colors'),
8+
},
9+
plugins: [],
10+
corePlugins: { preflight: true },
11+
}
12+
13+
let input = css`
14+
@tailwind base;
15+
@tailwind utilities;
16+
`
17+
18+
return run(input, config).then((result) => {
19+
expect(result.css).toContain(`border-color: currentColor;`)
20+
})
21+
})

0 commit comments

Comments
 (0)