MadLittleMods / MadLittleMods/postcss-css-variables
Use variable only from last pseudo-element
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 551
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Description
Input
```css
.bar {
--color: pink;
color: var(--color);
}
.bar:active {
--color: blue;
}
.bar:hover {
--color: red;
}
.bar:focus {
--color: green;
}
```
Expected
```css
.bar {
color: pink;
}
.bar:active {
color: blue;
}
.bar:hover {
color: red;
}
.bar:focus {
color: green;
}
```
Will be transformed to (Actual)
😞
```css
.bar {
color: pink;
}
.bar:focus {
color: green;
}
.bar:hover {
color: green;
}
.bar:active {
color: green;
}
```
Contributor guide
No contributing guide indexed for this repository
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 CSS reproduction in the issue and trace the plugin's custom-property transformation behavior. Compare the generated output with the expected output for :active, :hover, and :focus, then verify that each state retains its own variable value and add regression coverage for the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100