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

chore: Correct token nesting for inverse color #1246

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion proprietary/tokens/src/components/ams/blockquote.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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

"value": "{ams.color.primary-white}"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"gap": { "value": "{ams.space.stack.md}" },
"inverse-color": { "value": "{ams.color.primary-white}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"row": {
"gap": { "value": "{ams.space.stack.md}" }
},
"details": {
"font-weight": { "value": "{ams.text.font-weight.bold}" },
"padding-inline-start": { "value": "{ams.space.inside.xl}" }
},
"inverse": {
"color": {
"value": "{ams.color.primary-white}"
}
},
"row": {
"gap": { "value": "{ams.space.stack.md}" }
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion proprietary/tokens/src/components/ams/heading.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"color": { "value": "{ams.color.primary-black}" },
"font-family": { "value": "{ams.text.font-family}" },
"font-weight": { "value": "{ams.text.font-weight.bold}" },
"inverse-color": { "value": "{ams.color.primary-white}" },
"inverse": {
"color": {
"value": "{ams.color.primary-white}"
}
},
"level": {
"1": {
"font-size": { "value": "{ams.text.level.1.font-size}" },
Expand Down
12 changes: 8 additions & 4 deletions proprietary/tokens/src/components/ams/ordered-list.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"gap": { "value": "0.75rem" },
"inverse-color": { "value": "{ams.color.primary-white}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"list-style-type": { "value": "decimal" },
"small": {
"font-size": { "value": "{ams.text.level.6.font-size}" },
"line-height": { "value": "{ams.text.level.6.line-height}" }
"inverse": {
"color": {
"value": "{ams.color.primary-white}"
}
},
"item": {
"margin-inline-start": {
Expand All @@ -35,6 +35,10 @@
"comment": "The total level >=2 indentation for Amsterdam is 28 pixels, or 1.75rem."
}
}
},
"small": {
"font-size": { "value": "{ams.text.level.6.font-size}" },
"line-height": { "value": "{ams.text.level.6.line-height}" }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
"font-family": { "value": "{ams.text.font-family}" },
"font-size": { "value": "{ams.text.level.0.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.bold}" },
"inverse-color": { "value": "{ams.color.primary-white}" },
"line-height": { "value": "{ams.text.level.0.font-size}" }
"line-height": { "value": "{ams.text.level.0.font-size}" },
"inverse": {
"color": {
"value": "{ams.color.primary-white}"
}
}
}
}
}
12 changes: 8 additions & 4 deletions proprietary/tokens/src/components/ams/paragraph.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"inverse-color": { "value": "{ams.color.primary-white}" },
"small": {
"font-size": { "value": "{ams.text.level.6.font-size}" },
"line-height": { "value": "{ams.text.level.6.line-height}" }
"inverse": {
"color": {
"value": "{ams.color.primary-white}"
}
},
"large": {
"font-size": { "value": "{ams.text.level.4.font-size}" },
"line-height": { "value": "{ams.text.level.4.line-height}" }
},
"small": {
"font-size": { "value": "{ams.text.level.6.font-size}" },
"line-height": { "value": "{ams.text.level.6.line-height}" }
}
}
}
Expand Down
14 changes: 9 additions & 5 deletions proprietary/tokens/src/components/ams/unordered-list.tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
"font-size": { "value": "{ams.text.level.5.font-size}" },
"font-weight": { "value": "{ams.text.font-weight.normal}" },
"gap": { "value": "0.75rem" },
"inverse-color": { "value": "{ams.color.primary-white}" },
"line-height": { "value": "{ams.text.level.5.line-height}" },
"list-style-type": { "value": "'\\2022'" },
"inverse": {
"color": {
"value": "{ams.color.primary-white}"
}
},
"item": {
"margin-inline-start": {
"value": "1.625rem",
Expand All @@ -19,6 +23,10 @@
"comment": "The total level 1 indentation for Amsterdam is 40 pixels, or 2.5rem."
}
},
"small": {
"font-size": { "value": "{ams.text.level.6.font-size}" },
"line-height": { "value": "{ams.text.level.6.line-height}" }
},
"unordered-list": {
"list-style-type": { "value": "'\\2013'" },
"item": {
Expand All @@ -31,10 +39,6 @@
"comment": "The total level >=2 indentation for Amsterdam is 28 pixels, or 1.75rem."
}
}
},
"small": {
"font-size": { "value": "{ams.text.level.6.font-size}" },
"line-height": { "value": "{ams.text.level.6.line-height}" }
}
}
}
Expand Down
Loading