Either 0 or 1 times. Use semantic classes `<a href="/path/to/create-stuff" class="button">` and use custom properties or the cascade from there:
:root {
--button-margin-block: 1ex;
--button-margin-inline: 1em;
}
dialog {
/*
* Modals buttons need more block space and
* less inline space.
*/
--button-margin-block: 1em;
--button-margin-inline: 1ex;
}
button,
.button {
margin-block: var(--button-margin-block);
margin-inline: var(--button-margin-inline);
}[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/--*
[2]: https://drafts.csswg.org/css-nesting-1/
[3]: https://postcss.org/
My current shop is moving to switch our sass color function `color.get()` to either dump hardcoded hex or a css variable usage based on a param. It currently just does hex.
You might be happy to learn that CSS color module 4[1] will add `lab()` and `lch()` color definitions and CSS color module 5[2] will add the `color-adjust` function as well as other goodies.
padding: p(‘s’) p(‘m’);
For that 8-px magic.
c for colors, bp for breakpoints, f for fonts etc.
This solves all the inconsistencies addressed by css frameworks and gives me slightly larger LEGO blocks.