diff --git a/src/lib/parseCssConfig.js b/src/lib/parseCssConfig.js index 99a9acfd8..b218304f7 100644 --- a/src/lib/parseCssConfig.js +++ b/src/lib/parseCssConfig.js @@ -23,7 +23,8 @@ export function parseCssConfig(root) { } }) - theme.remove() + // Allow the variables to be used with var() anywhere in CSS + theme.selector = ':root' return config } diff --git a/tests/css-configuration.test.js b/tests/css-configuration.test.js index 470801809..9b25c2bbc 100644 --- a/tests/css-configuration.test.js +++ b/tests/css-configuration.test.js @@ -32,6 +32,9 @@ test('it does something', () => { --tw-text-opacity: 1; color: rgb(250 202 222 / var(--tw-text-opacity)); } + :root { + --colors-potato: #facade; + } `) }) })