parcel-bundler / parcel-bundler/lightningcss

[css-minifier] the declaration in `@supports` needs to be compressed

Open
#301 3 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.