-
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
More consistent named color variables (#1595) #1604
More consistent named color variables (#1595) #1604
Conversation
okay, I think it looks good. since it is a breaking change I would like other peoples opinion before it is merged into a next major or minor release. Also we will need to add 2 functions to force to a keyword or force to a color code in order that people can get around the breaking change if they are using a color variable to for instance append to an imported url (which some people do, I've seen in issues). |
Yes, I think we need to give it a time for more opinions to appear. Also I'm especially concerning about compatibility with --compress option, it looks like I definitely should modify this somehow. |
I'm going to pull this into 1.6, along with your other bigger changes. For now I'm pullijng smaller, safer bug fixes and things for a 1.5.1 release. but thanks very much not just for this but other changes... |
Thanks, I think I will make some minor improvements before 1.6 (performance optimization + explicit functions for conversion maybe... not sure yet) |
It's strange. I did not actually forget about this PR but for some reason I thought we decided to pospone this until 2.x or something like this... I don't know why... But considering changes in #1803 I think this one is better to come earlier... |
pulled into the 2.0.0 branch |
I just want to clarify that the plan for these changes in the 2.0.0 branch will allow for this example of what I desire to be able to do:
I'm defining a new "red" value through |
@scottgit I've tested it and no, unfortunately your example fails with this PR (internally P.S. The simplest fix would be just to rename this variable to |
See #1595.
Summary of changes:
[1]. Color variable outputs a named color if this variable was defined with a named color.
[2]. Named color is NOT used after you apply any math operation or one of the color processing functions (even if the value itself is not changed):
[3]. Fixed the following inconsistency (#1382):
Now all three are
red
.[4]. This patch does NOT change the following:
[5]. Named to numeric color conversion.
color
function now also accepts unquoted args and always outputs a numeric value:[6].
color
function now performs more strict "3/6-digit" conversion. This fixes the following inconsistencies:Now such cases result in a error.
[7]. Added support for case-insensitive colour keywords (follows #1803).