MadLittleMods / MadLittleMods/postcss-css-variables

Negative variables are not compiled after update

Open
#122 1 comment 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

Did something change regarding the compilation of negative variables?

In v0.14.0 this:

```css
.foo {
--width: 100px;
with: -var(--width);
}
```

used to output:

```css
.foo {
with: -100px;
}
```

But after updating to v0.17.0 I get:

```css
.foo {
with: -var(--width);
}
```

I tried reproducing in the [playground](https://madlittlemods.github.io/postcss-css-variables/playground/), but this still runs on v0.14.0.

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 comparing the v0.14.0 and v0.17.0 handling of the negative variable example, since the issue provides the expected and actual CSS output and identifies the playground as an entry point. Locate the compilation path for negative variables, add a regression test for the shown input, and verify that the output contains the resolved negative value.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
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.