-
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
Alpha hex support #1013
Comments
will this get in the way of the old IE 8 hex digits? As I remember that begins with alpha.. where as here you would expect it to end in alpha.. Plus I imagine taking an old css sheet and suddenly accepting 8 hex digits and then outputting rgba would also break things. |
Yes, while I agree that #RRGGBBAA makes more sense to me, that would indeed clash with argb (#AARRGGBB) that's already in LESS. Admittedly it's done via a function, not a language construct, but it would seem to make sense to use the same format in both if we're to do that. |
I didn't realize IE had 8 digit hex. LESS could still normalize this but it could potentially break existing IE-specific sheets. Somehow, I doubt many people are using said IE-specific hex values these day though. That, or support the #AARRGGBB format throughout. But I think that is backwards-looking. |
.. just recently someone went to the trouble of extending dotless to leave these type of hex values alone TBH I think I see more gain in allowing |
Yes, I don't think this is really worth doing. |
Perhaps as a sub-proposal, some way of indicating that the colour is ARGB vs RGBA?
versus
or
|
closing due to general lack of support for this feature. |
Can this be reopened bearing in mind 4 and 8-digit hex are defined in CSS Color Module Level 4 |
I assume Less could auto-convert |
Yes, it's just a matter of adding add a few lines to handle |
I don't know when it happened, but at some point Example: It isn't documented but it should be, so I did so in this pull request. |
#697 proposes single and double character hex color support (eg:
#E
would convert to#EEEEEE
).In the spirit of this, I'm proposing support for alpha hex support.
#FF000080
The extra two hex digits at the end would represent the alpha/opacity. LESS could convert this to:
rgba(255, 0, 0, 0.5)
Producing a pure red with 50% opacity.
The text was updated successfully, but these errors were encountered: