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

Document SCSS color naming guidelines #19352

Closed
iandunn opened this issue Dec 27, 2019 · 2 comments
Closed

Document SCSS color naming guidelines #19352

iandunn opened this issue Dec 27, 2019 · 2 comments
Labels
[Feature] Colors Color management Needs Decision Needs a decision to be actionable or relevant

Comments

@iandunn
Copy link
Member

iandunn commented Dec 27, 2019

Problem

It's not obvious to me how the names in base-styles/_colors.scss and other SCSS files are chosen.

  • Why do some names describe the color itself (e.g., $dark-opacity-light-200) while others describe the usage of the color (e.g., $get-caption-background-color).
  • Why do some names describe the color, but not include number at the end? e.g., $subtle-light-gray
  • How do I determine if the specific hex value I want to use should be considered "medium" or "dark"? Are those specific references to Core's style guide -- in which case they wouldn't necessarily be relevant to plugins -- or is there some objective standard?
  • How do I determine what the number at the end should be?

That confusion (and maybe inconsistency) makes it difficult to set a matching standard in plugins, and contribute to some areas of Gutenberg itself.

Proposed Solution

  • Add a section to coding-guidelines.md describing the convention. If it's an external one, linking to a detailed document would be helpful as well.
  • Add a comment at the top of _colors.scss mentioning that the convention is documented in coding-guidelines.md.
@skorasaurus
Copy link
Member

very closely related: #7553

@skorasaurus skorasaurus added [Feature] Colors Color management Needs Decision Needs a decision to be actionable or relevant labels Nov 23, 2021
@ryanwelcher ryanwelcher removed the [Type] Developer Documentation Documentation for developers label Feb 28, 2023
@jordesign
Copy link
Contributor

Conversation on the naming and classes of CSS seems to have consolidated in #29568 - so I'll close this issue in favour of that one.

@jordesign jordesign closed this as not planned Won't fix, can't repro, duplicate, stale Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Colors Color management Needs Decision Needs a decision to be actionable or relevant
Projects
None yet
Development

No branches or pull requests

4 participants