MadLittleMods / MadLittleMods/postcss-css-variables

Optionally preserve

Open
#94 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

My idea is to add an option to exclude only some variables. Because I have postcss-color-function plugin, I don't want preserve all these variables.

For example I don't want preserve variables with color function.

Input:

.box {
    color: color(var(--red) a(90));
    padding-left: var(--pl);
}

Ideal/expected Result:

.box {
    background: rgba(255, 0, 0, 0.9);
    padding-left: 20px;
    padding-left: var(--pl);
}

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

No files, tests, or entry points are named in the issue. Start by locating the plugin's option handling and CSS variable transformation path, then compare the supplied input with the expected output. Done means an option can exclude only selected variables, such as those used with color(), while preserving the requested fallback behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
frontend, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.