-
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
feat!: Consolidate Grid Space and Component Space into one set of spacing tokens #1910
base: develop
Are you sure you want to change the base?
Conversation
# Conflicts: # proprietary/tokens/src/components/ams/header.tokens.json
5614b4b
to
99aa1fc
Compare
04ad0f6
to
efe263e
Compare
"sm": { "value": "{ams.space.md-lg}" }, | ||
"md": { "value": "{ams.space.lg-xl}" }, | ||
"lg": { "value": "{ams.space.xl-2xl}" } |
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’m not sure we still need these three options – 50%, 100% or 150% of a grid gap as padding above or below it. I think we can just keep the medium value, like we do for horizontal (inline) padding.
If people want more than a grid gap of whitespace below something, they can add a bottom margin through or .ams-mb-*
utility classes.
This is also the only place where the ams.space.xl-2xl
custom pair is used, so if we remove small and large block padding, we can also remove one custom pair space token.
Describe the pull request
What
var(--ams-space-grid-sm)
withvar(--ams-space-lg)
var(--ams-space-grid-md)
withvar(--ams-space-xl)
while changing its value from 48 to 56.var(--ams-space-grid-lg)
withvar(--ams-space-2xl)
; this is a new tokenvar(--ams-space-xl)
has also changed here, from 32 to 36.To help understand how the values changed, here are screenshots from the new (left) and previous (right) token tables, for Spacious (above) and Compact mode (below):
Why
This is meant to make our spacing system easier to use. Many people find it confusing to have both ‘grid spacing’ and ‘regular spacing’. It also lets us set the gap between components without needing separate grid cells.
Usually, choosing a size between
xs
andxl
will be sufficient for most people.If they think they need one of the custom pairs, which are a bit more complex, knowing that they range between existing spacing lengths will help them understand.
How
n/a
Checklist
Before submitting your pull request, please ensure you have done the following. Check each checkmark if you have done so or if it wasn't necessary:
Additional notes