parcel-bundler / parcel-bundler/lightningcss
[css-minifier] the declaration in `@supports` needs to be compressed
Open
Nobody has claimed this yet.
area: minification
- Dominant language
- Rust
- Stars
- 7.7k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
Input
@supports (new-property: 0px) {
body {
background: green;
}
}
Output
@supports ( new-property: 0px ){body{background:green}}
Please note that the 0px here should not be compressed to 0, the original intent of the CSS author needs to be maintained here.
Similarly if it's calc(10px * 2) don't compress it to 20px
@supports(new-property:0px){body{background:green}}
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
The issue names no file or test. Start by locating the CSS minifier's handling of @supports and reproduce the supplied input/output; done means declarations are compressed while preserving 0px and calc(10px * 2) inside @supports, with regression coverage for both examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100