MadLittleMods / postcss-css-variables

PostCSS plugin to transform CSS Custom Properties(CSS variables) syntax into a static representation
https://madlittlemods.github.io/postcss-css-variables/playground/
Other
540 stars 62 forks source link

margin shorthand with 3 values is merged into one #82

Open renestalder opened 6 years ago

renestalder commented 6 years ago

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.