-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
$turquoise: #16a085; | ||
$green: #27ae60; | ||
$red: #c0392b; | ||
$blue-color: #3498db; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think color names need the -color
suffix. Just things like $success
, $text
, which could use the clarity of $success-color
, $text-color
.
Discussed this with @kpeatt. We agreed that we should be consistent with the // All colours use a `-color` suffix except explicit colour names,
// in which case the suffix should be left off.
// Additional suffixes `-light` and `-dark` should go after `-color`.
// Good
$brand-color: #f00;
$brand-color-light: #ba2;
$blue: blue;
$blue-light: cyan;
// Not good
$brand: #f00;
$brand-light-color: #ba2;
$blue-color: blue;
$blue-light-color: cyan: |
I recently read elsewhere a convention that was similar, but the order of the words inside the variable name were slightly different: Note that "color-" comes first...
rather than...
This convention might make lists of many colors a bit more readable/scannable.
|
Would that be worth considering? |
@jeffkamo Yeah, I think we might want to start using Eg. |
Definitely. I’m on the fence myself about this :) The idea of {category}-{thing}-{variation} is compelling. Just thinking about it across the board: $color-brand: #f00;
$color-brand-light: #ba2;
// Is this weird tho? Or would we leave it as `$font-family`?
$family-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
// Or is $font-family analogous to a var called $color, where it’s
// the bare default and “base/default” is implicit?
$color;
$font-family;
$font-size; |
I think ie. |
Agreed offline to do this all as part of establishing a new global variable naming convention. See #29. |
More overt color variable naming
Status: Opened for visibility
Reviewers: @ry5n @jeffkamo
Changes
-color
.-light
and-dark
suffixes instead.Notes
-gradient
the same way as the-color
suffix. #20