rem
A CSS length unit equal to the font size of the root html element, which is 16 pixels unless the user or page changes it.
In more detail
Sizes in rem grow when a user raises their browser's default font size, which pixel sizes do not, so rem is kinder to people with low vision. Token pipelines convert pixels to rem by dividing by 16, so 24px becomes 1.5rem.
Example
The lesson transform turns spacing-md 16px into --spacing-md: 1rem.Related terms
- pixel — The CSS absolute length unit px, defined as 1/96 of an inch and roughly one dot on a standard-density screen.
- token transform — A Style Dictionary step that changes one token at a time, such as converting 16px to 1rem or renaming a token to camelCase.
- fluid typography — Font sizes that grow smoothly with the width of the screen between a minimum and a maximum, instead of jumping at breakpoints.
Taught in
- Token Transformation: Style Dictionary & Multi-Platform Outputs — Design Systems & Component Engineering
- Typography & Spatial Grids: Modular Scales & Fluid Typography — Design Systems & Component Engineering