Skip to content

feat: minify colors in var() fallback values #1143

Draft
yisibl wants to merge 2 commits intoparcel-bundler:masterfrom
yisibl:minify-color-in-var
Draft

feat: minify colors in var() fallback values #1143
yisibl wants to merge 2 commits intoparcel-bundler:masterfrom
yisibl:minify-color-in-var

Conversation

@yisibl
Copy link
Contributor

@yisibl yisibl commented Jan 29, 2026

No description provided.

For security purposes, a whitelist mechanism has been added, which only
takes effect for color-related properties and within `var()` expressions.
Add support for minifying colors inside var() fallback values when usedwithin CSS gradient functions and image-related properties.

Changes:

- Rename `COLOR_KEYWORDS` to `MINIFY_COLORS_IN_FN`
- Extend has_color_function() to include more gradient functions and `image-set()`:
- Update tests to verify color minification in var() fallbacks
@yisibl yisibl marked this pull request as draft February 2, 2026 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant