MadLittleMods / MadLittleMods/postcss-css-variables

margin shorthand with 3 values is merged into one

Open
#82 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:

.klt-p-block-heading {
    margin: var(--klt-l-spacing-1, 0) 0 var(--klt-l-spacing-3, 0);
    position: relative;
}

Expected output:

.klt-p-block-heading {
    margin: 40px 0 30px;
    position: relative;
}

Given output:

.klt-p-block-heading {
    margin: 40px;
    position: relative;
}

Works fine when using margin with 4 values and two values. But not with 3 values. Possible to happen with other shorthands too.

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 three-value margin case shown in the issue, then locate the plugin entry point and existing tests for CSS variable transformation. Compare the handling of two-, three-, and four-value shorthands and add regression coverage for the three-value case. Done means the example preserves all three resolved values without regressing the other shorthand forms.

Written by the indexing model from the issue text.

Assessment

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