-
-
Notifications
You must be signed in to change notification settings - Fork 78.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
V4 variable reuse #23748
V4 variable reuse #23748
Conversation
Just a quick note: I've opted to merge #23943, so we'll need to revisit the variable reuse here. |
Will do, as well as other improvements |
@mdo, I've rebased the branch to catch up. Here are the notable changes:
The rest of the changes use the aforementioned functions to ensure contrast between a components background and it's color. All in all, colors propagate roughly in the following sequence |
@mdo: thoughts? |
This PR would indeed give you more control over the color of some components, but I personally also like the inheritance of @mdo, @andresgalante what do you think? |
I would, of course, document the hell out of everything, as long as I know I am on the right path. I am also open to variable name change; function renaming; squashing ... you name it. That is, if someone actually gave feedback ;) |
Sure, good call to not to document everything in this phase. I also think what you want to achieve is something valuable, and people can still set variables to My major concern is that this will overcomplicate things too much for those who are pretty new to |
We've fixed the ability to configure the component colors with #28035 in the meantime. This covers the ability to change colors per component. Changing the component color based using these functions feels a bit over engineered imo. We'll pass on this. |
In a nutshell:
color-yiq
mixin to a genericcontrast-yiq
function to be used for ensuring contrast;$component-*
variables linked to$body-
variables;$body-
vars:$component-
vars:Few notes:
Related to #23595