Skip to content

fix(color-scheme): for unknown keywords, output them as-is instead of normal#1152

Merged
devongovett merged 1 commit intoparcel-bundler:masterfrom
yisibl:fix-color-scheme-unknow
Feb 18, 2026
Merged

fix(color-scheme): for unknown keywords, output them as-is instead of normal#1152
devongovett merged 1 commit intoparcel-bundler:masterfrom
yisibl:fix-color-scheme-unknow

Conversation

@yisibl
Copy link
Contributor

@yisibl yisibl commented Feb 13, 2026

  • Rework ColorScheme::parse to consume only known keywords (normal, only, light, dark) instead of swallowing unknown idents. This lets Property::parse fail expect_exhausted and fall back to Property::Unparsed, so values like inherit, unset, and unknown identifiers are kept and serialized as-is rather than being normalized to normal.
  • Also fix ColorScheme::to_css to serialize only without a leading space when it appears alone.

Part of: #821 (comment)

… `normal`

- Rework `ColorScheme::parse` to consume only known keywords (`normal`, `only`, `light`, `dark`)
instead of swallowing unknown idents. This lets `Property::parse` fail `expect_exhausted` and
fall back to `Property::Unparsed`, so values like `inherit`, `unset`, and unknown identifiers are
kept and serialized as-is rather than being normalized to `normal`.
- Also fix `ColorScheme::to_css` to serialize `only` without a leading space when it appears alone.
@devongovett devongovett merged commit 3136cbb into parcel-bundler:master Feb 18, 2026
3 checks passed
@yisibl yisibl deleted the fix-color-scheme-unknow branch February 23, 2026 15:57
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.

2 participants