MadLittleMods / MadLittleMods/postcss-css-variables

Fallbacks seem to break other var() in same decl

Open
#23 2 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

For example, on line 133 of sanitize.css (currently), the following line appears:

font: var(--html-font-size, 100%)/var(--html-line-height, 1.5) var(--font-family, sans-serif);

The postcss-custom-properties plugin correctly resolves this to read:

font: 100% / 1.5 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif';

This plugin simply outputs:

font: 100%;

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

Reproduce the declaration from the issue through the plugin's processing path and compare the generated value with the expected output shown here. Trace how multiple var() expressions in one declaration are handled, then add coverage for this case and verify that the complete font value is preserved.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.