parcel-bundler / parcel-bundler/lightningcss
sRGB color notations converting to hex with option disabled
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.7k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
The documentation states, "By default Lightning CSS does not perform any transpilation of CSS syntax for older browsers. This means that if you write your code using modern syntax or without vendor prefixes, that’s what Lightning CSS will output."
However, if I leave target browsers list empty and don't include any features, some colors are getting converted to hex notation. This happens for rgb(), hsl(), and hwb() colors, but not for newer wide-gamut notations like oklch() and oklab().
Expected result: colors should be left as authored in the final output
Actual result: Most color notations are being converted to hex
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior in the linked Lightning CSS playground using the provided source, empty browser targets, and disabled feature options. Compare the output for rgb(), hsl(), hwb(), oklch(), and oklab() with the expected authored forms; done means colors remain unchanged when no transpilation is requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100