Last active
November 15, 2018 14:52
-
-
Save vviikk/6edefdcc335794c78407ac979fa8db71 to your computer and use it in GitHub Desktop.
custom properties ordering
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
/* CONSTANTS on top */ | |
--COLOR-PRIMARY: palevioletred; | |
--COLOR-GRAY: silver; | |
/* Regular custom properties */ | |
--heading-color: var(--COLOR-GRAY); | |
} | |
h1 { | |
/* Custom properties without calc */ | |
--heading-color: var(--COLOR-PRIMARY); /* Value is overridden */ | |
/* Custom properties with calc */ | |
--heading-padding-bottom: calc(var(--padding) * 1em); | |
/* Properties that rely on other custom properties */ | |
color: var(--heading-color); | |
/* Regular properties with CSS values */ | |
text-decoration: underline; | |
} | |
button { | |
--button-scale-pc--hover: 25%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment