Skip to content

Commit d7a0208

Browse files
committed
fix: exclude screens values from using variables
1 parent f714479 commit d7a0208

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ const formatTokens = (
2020
}
2121

2222
if (cur.attributes.category === type || type === 'all') {
23-
if (isVariables) {
23+
/**
24+
* Make sure screens values are not using CSS variables as
25+
* CSS @media queries do not support CSS variables
26+
*/
27+
if (isVariables && cur.attributes.category !== 'screens') {
2428
acc[Object.values(cur.attributes).join('.')] = prefix
2529
? `var(--${addHyphen(prefix) + cur.name})`
2630
: `var(--${cur.name})`

0 commit comments

Comments
 (0)