Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vviikk/e16bc1591dbd8244b42b374822a3bdb7 to your computer and use it in GitHub Desktop.
Save vviikk/e16bc1591dbd8244b42b374822a3bdb7 to your computer and use it in GitHub Desktop.
:root {
/* Calculated properties in --kebab-case
Prefix the property name what it's affecting. i.e. `font-size`.
|
| Add some context of what it is.
| |
↓ ↓ */
--font-size-min-px: calc(var(--FONT-SIZE-MIN) * 1px);
--font-size-max-px: calc(var(--FONT-SIZE-MAX) * 1px);
/* ^ suffix with the unit type (i.e. px, rem) */
--font-size-difference: calc(var(--FONT-SIZE-DIFFERENCE));
/* ^ unitless values don't have a unit as a suffix */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment