parcel-bundler / parcel-bundler/lightningcss
Lightning CSS doesn't escape `content: "\..."`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.7k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
We have @charset "UTF-8"; in our CSS which Lightning CSS is skipping when bunding/minifying the styles.
Without it, it's possible to encounter issues with displaying unicode like in https://github.com/parcel-bundler/lightningcss/issues/164.
There are other ways to insert the character encoding like HTTP headers and the HTML but this is not possible for people in some use cases.
Is it possible to respect the @charset rule?
I've also prepared a Playground link demonstrating the issue.
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
Start with the supplied Playground reproduction and trace how Lightning CSS handles @charset during parsing and minification, especially the escaped content value. Compare the current output with the input and verify that UTF-8 encoding and the character rendering case from issue 164 are preserved. Done means the reported reproduction produces correct output without regressing other CSS processing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100