parcel-bundler / parcel-bundler/lightningcss
Minifier: Drop Redundant Doubled Properties?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.7k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
Hi @devongovett ! 👋 First of all, thanks for all of your effort on this, really amazing for the community to have such a great tool!
I was looking for a feature of @parcel/css that would allow for removal of duplicate properties.
For example:
Input
div {
color: green;
color: red;
}
@parcel/css Output (Playground Link)
div{color:green;color:red}
Expected Output
div{color:red}
However, it could be a problem with my understanding of the CSS spec somehow, because I see that some duplicated properties do indeed get dropped:
Input
div {
background: green;
background: red;
}
@parcel/css Output (Playground Link)
div{background:red}
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 two CSS examples and their linked @parcel/css Playground outputs, then check the CSS specification rules for removing earlier declarations without changing fallback behavior. Done means redundant doubled properties such as color are safely removed while valid duplicate-declaration cases remain preserved, matching the expected output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100