Background/Goal
At the moment, the Size Codex demo is representing just the rem values. Size tokens come in rem (relative) units, because the size of elements should typically scale with font size so that these elements are legible. This is why we use a rem representation in Size tokens while px in Spacing ones.
Anyway, it's important to represent the px values there since are the values we use in design and there is no way now to check the px values in the Size tokens. So we need to show the px values in the Size tokens table.
User stories
- As a designer, I need to check both em and px values in the Size tokens table.
References
- Shopify DS represents both em and px values in the demo
Proposal
Show an "Equivalent to 16px when the base font-size is 16px" as a tooltip when hovering the size token.
Acceptance criteria (or Done)
- Show px values as a tooltip when hovering over the size tokens