-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added 'transparent' as a named color #800
Conversation
lgtm |
Added 'transparent' as a named color
@sashasklar and @SpadarShut - won't this mean that transparent is converted to rgba(0,0,0,0) ? But it seems rgba(0,0,0,0) has less support than the transparent keyword.. what problem is this trying to solve? |
Color functions don't work when one of the colors is transparent. |
Ok, what do you think.. shouldn't less attempt to convert rgba(0,0,0,0) back to "transparent" when rendering ? |
I think less should not convert all rgba(0,0,0,0), transparent should remain transparent where authors specified it, but transparent should become rgba(0,0,0,0) when it's procecced to produce another color. |
this causes problems when using background shorthand:
is compiled to:
I'm compiling using node v0.6.17 |
I guess that's because the named colors are processed from HEX notation, but rgba() is the only exception from the list. |
And even if you fix that, it will only keep a transparent keyword in simple rules (less.js uses a catch all regex when possible on rules), any place where it has to be parsed it will be converted to rgba. Untill less.js records the initial format of colors, it would be safer to convert rgba(0,0,0,0) to transparent. |
rgba(0,0,0,0) has no support in IE6 / 7 / 8 so I hope that this doesn't change all "transparent" keywords to rgba. |
No description provided.