From e59dc7f03bad8a95557542a0e8f4bfc2acf3060c Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 1 Feb 2022 11:22:08 -0500 Subject: [PATCH] Fix preflight border color fallback --- src/css/preflight.css | 2 +- tests/preflight.test.js | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 tests/preflight.test.js diff --git a/src/css/preflight.css b/src/css/preflight.css index c15a3f2da831..a6d055aaca53 100644 --- a/src/css/preflight.css +++ b/src/css/preflight.css @@ -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, diff --git a/tests/preflight.test.js b/tests/preflight.test.js new file mode 100644 index 000000000000..7ba5d3f9fa13 --- /dev/null +++ b/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`
` }], + 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;`) + }) +})