Skip to content

Instantly share code, notes, and snippets.

@tomhodgins
Created February 28, 2020 15:36
Show Gist options
  • Save tomhodgins/2ac199d370d40707bbd943bc83bf3d6e to your computer and use it in GitHub Desktop.
Save tomhodgins/2ac199d370d40707bbd943bc83bf3d6e to your computer and use it in GitHub Desktop.
/* Either external library of these helper rules exist */
/* Or can be added to any stylesheet */
--big {
font-size: xx-large;
}
--red {
color: #c00;
background: white;
}
--basic {
-webkit-appearance: none;
appearance: none;
border: none;
}
/* Then you use them with an --apply property */
button {
font-family: impact;
--apply: big red basic;
}
/* And end up with this output, and no helper rules */
button {
font-family: impact;
font-size: xx-large;
color: #c00;
background: white;
-webkit-appearance: none;
appearance: none;
border: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment