postcss / postcss-color-function

PostCSS plugin to transform W3C CSS color function to more compatible CSS
MIT License
323 stars 31 forks source link

Stripping required spaces #26

Closed studiosciences closed 8 years ago

studiosciences commented 8 years ago
#Input:
border-color: color(#111111 l(-5%)) color(#111111 l(-5%)) color(#111111 l(-15%));

#Output:
border-color: rgb(5, 5, 5)rgb(5, 5, 5)rgb(0, 0, 0);

I can repro this in the UI Next playground. I also see this with the webpack CSS Loader and minification disabled.

TrySound commented 8 years ago

Can be fixed with postcss-value-parser. @studiosciences Can you send pr?

studiosciences commented 8 years ago

I'll take a look, but I'm not so sure this will fall within my area of expertise.

studiosciences commented 8 years ago

@TrySound I wrote a couple of tests and the parser and stringifier didn't have issues. It detected the space between the functions as a node and retained it when stringified. So I'm back to looking at this plugin.

studiosciences commented 8 years ago

@TrySound ah, I for some reason thought this was an issue with postcss-value-parser, rather than could be fixed by using it instead of balanced-match.

I'll try a quicker fix first. Using postcss-value-parser seems like a fix from someone else.

TrySound commented 8 years ago

@studiosciences Which exactly issue?

MoOx commented 8 years ago

Closed by #27