johno / postcss-shorthand-expand

Remove shorthand properties in your CSS
MIT License
16 stars 0 forks source link

Fails to expand shorthands with css custom properties #2

Open aleray opened 8 years ago

aleray commented 8 years ago

Hi,

the following code fails to be expanded:

:root {
    --my-color: red;
}

.test {
    border: 1px solid var(--my-color);
}

and raises the error:

postcss-shorthand-expand failed to expand a property border: 1px solid var(--my-color);

Do you see a fix for that?

Thanks

johno commented 8 years ago

Thanks for reporting this issue, currently this plugin essentially wraps css-shorthand-expand so that'd be the place to look for handling custom properties.

I will be pretty bogged down for the next week so I won't be able to look into it anytime soon, but if I get a chance to do some digging I'll let you know since I'd really like to be able to handle custom properties with this plugin.

acespace90 commented 5 years ago

Same issue. Updates after 3 years? :-)

ugljanin commented 2 years ago

Still the same problem, and we use var() extensively in Gutenberg themes.