-
Notifications
You must be signed in to change notification settings - Fork 8
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
chore: Correct token nesting for inverse color #1246
Conversation
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.
LGTM
@@ -6,7 +6,11 @@ | |||
"font-size": { "value": "{ams.text.level.3.font-size}" }, | |||
"font-weight": { "value": "{ams.text.font-weight.bold}" }, | |||
"line-height": { "value": "{ams.text.level.3.line-height}" }, | |||
"inverse-color": { "value": "{ams.color.primary-white}" } | |||
"inverse": { | |||
"color": { |
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.
This means the modifier name is now 'inverse', right, not 'inverse-color'?
So it should be ams-paragraph--inverse
, for example?
Or should the token be ams.paragraph.inverse-color.color
?
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.
Good point. I’ve mentioned this change in a broader ticket on this API. We can leave this as is until then.
@@ -6,7 +6,11 @@ | |||
"font-size": { "value": "{ams.text.level.3.font-size}" }, | |||
"font-weight": { "value": "{ams.text.font-weight.bold}" }, | |||
"line-height": { "value": "{ams.text.level.3.line-height}" }, | |||
"inverse-color": { "value": "{ams.color.primary-white}" } | |||
"inverse": { | |||
"color": { |
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.
Changing the token structure is technically a breaking change, I think
Closing – doing this right requires changing CSS classes and React props as well, and we’re planning to revisit the entire API around colours soon anyway. |
This doesn’t affect the actual token names, but having
inverse-color
as a level violates the rule that the name of the leaf must be a CSS property.