Skip to content
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

[WIP] v5: Update colors to add shades and tints #28268

Closed
wants to merge 3 commits into from
Closed

[WIP] v5: Update colors to add shades and tints #28268

wants to merge 3 commits into from

Conversation

mdo
Copy link
Member

@mdo mdo commented Feb 14, 2019

WIP, do not merge.

Exploring how to change up the mixins and adding multiple shades and tints to our colors for more flexibility. My hope is to at least restore some lighter variations to utilities like our .bg- options, but we'll likely keep the 100-900 variables as just variables and not classes.

TODO:

  • Provide utilities for gray shades/tints

@mdo mdo requested a review from a team as a code owner February 14, 2019 18:03
@mdo mdo changed the title v5: Update colors to add shades and tints [WIP] v5: Update colors to add shades and tints Feb 14, 2019
@mdo mdo mentioned this pull request Mar 13, 2019
13 tasks
@joneff
Copy link
Contributor

joneff commented Apr 16, 2019

Regarding tint and shade, if it ultimately works like a subset of theme-color-level why don't you use theme-color-level? It does add a slight overhead, but not that much e.g.:

@function tint-color($color, $level: 1) {
  @return theme-color-level($color, $level);
}

@function shade-color($color, $level: 1) {
  @return theme-color-level($color, - $level);
}

@MartijnCuppens
Copy link
Member

The naming of the classes might be a bit confusing. .red-800 doesn't really indicate what's going to be red. Would also like to have more control over what classes are generated and extend them if needed, probably something with maps or variables that control what is generated.

@mdo
Copy link
Member Author

mdo commented Apr 22, 2019

@MartijnCuppens Once you use the system, it becomes familiar and recognizable. We do this at GitHub with Primer and it works out pretty well. I don't anticipate having all these as classes though inside the framework—those classes are just for docs. Variables should be available for everyone, and ideally there's a better way to generate those (but Sass doesn't do generated variables as I understand it), but for now it's manual.

@MartijnCuppens
Copy link
Member

@mdo, I think we can better use the Utility API for this, this will give people more control over what classes are generated. People will probably also ask for responsive variants, which they can enable by simply setting responsive: true.

@mdo
Copy link
Member Author

mdo commented Aug 31, 2019

Superseded by #29348.

@mdo mdo closed this Aug 31, 2019
@mdo mdo deleted the v5-colors branch August 31, 2019 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants