MadLittleMods / MadLittleMods/postcss-css-variables

Comma separated rule not expanded into multiple with different values

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
551
Forks
63
PR merge metrics
No merged PRs in 30d

Description

Input

```css
:root {
--color: blue;
}

.my-theme {
--color: red;
}

:root,
.my-theme {
a {
color: var(--color);
}
}
```

Output:
```css
:root,
.my-theme {
a {
color: red;
}
}
```

Expected:
```css
:root {
a {
color: blue;
}
}

.my-theme {
a {
color: red;
}
}
```

Contributor guide

No contributing guide indexed for this repository

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

Start by reproducing the CSS input and output shown in the issue, then trace how comma-separated rules and custom-property values are processed. Verify the behavior when the selectors have different values in scope. Done means the example expands into separate :root and .my-theme rules with blue and red values respectively, without regressing other transformations.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.