-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[SCSS 6.2] possible bug, default $foundation-palette colors overriding old variables even if @include add-foundation-colors; is not included in _settings.scss #8292
Comments
@JeremyEnglert can you take a look at this? |
Found this while triaging outstanding v6.3. @andycochran do you have time to take a look? |
@kball Q: Is |
I'd agree with removing the old method too 👍 |
Let's not let the old method hang around until v6.4. 😬 |
Good point. There's actually a few things that have warnings that they'll be removed in 6.3 as well that we need to get through. Lets include this along with those and any fixes for bugs we find into a second RC mid next week. |
so question - does getting rid of the old method mean getting rid of the helper variables |
Good question, @kball. The more I think about it, the more complicated it gets. It looks like we're inconsistent in the way we're using color variables, e.g.:
We should be consistent in our default settings. It'd be nice if So I'd be okay with getting rid of the internal variables used for colors ( Having written this up, now I think it'd be best if we make Not sure what this means for the old method. I think it just means that this issue is no longer a bug as of v6.3, and we should clean up the inconsistencies in our default settings? |
@andycochran could we use the get-color function everywhere to make it a bit easier? |
What if, instead of using every color in
|
@andycochran I like that idea... similar to how we use |
@kball Exactly how we use |
I think we need to clarify what we mean by "requirements." The Global Styles > Colors docs say:
This isn't really accurate. If a color being "required" just means it's used by components, then Primary and Alert aren't any more required than Success or Warning. The only color that isn't used by component settings is Secondary. So is Secondary the only color that isn't required? Although messy and repetitive, it would be totally valid to delete all the keys in So, I'm not sure
|
I just took a pass at addressing some of the stuff brought up here. #9459 I don't think we can simply get rid of the helper variables for color classes. They're very useful. And the idea of I wonder if instead of hardcoding helper classes for each |
I'm going to close this. Through #9459, the docs have been updated to clearly explain how colors work in v6.3. |
I was wondering why something calling $alert-color had suddenly turned salmon color (I hadn't added in
$foundation-palette
+@include add-foundation-colors
) yet in my 6.2 migration.An easy override, but I'd rather fix the issue, so I copied the
$foundation-palette
map from the default_settings.scss
and edited the values inside. The element was colored as originally intended - however commenting / uncommenting@include add-foundation-colors
had no (immediately noticeable) difference.If I understand correctly,
$foundation-palette
is supposed to be optional and we can continue to use traditional variables, but at the moment (I assume) it's!default
values are overriding the old traditional variables. It'd also be nice to have some explanation of the implications of using the SASS map (I assume for autogenerating classes? hence why we'd want some things inside it and some more tertiary colors outside of it) - maybe that's up somewhere and I just haven't stumbled across it.The text was updated successfully, but these errors were encountered: