Created
November 15, 2018 13:59
-
-
Save vviikk/ec452edb5b32d50366788ea917000d45 to your computer and use it in GitHub Desktop.
custom-properties-constants-naming-convention.css
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 { | |
--FONT-SIZE-MIN: 16; | |
--FONT-SIZE-MAX: 26; | |
/* The properties below are also constants, as they don't rely on any external variables */ | |
--FONT-SIZE-MIN-PX: var(--FONT-SIZE-MIN) * 1px; | |
--FONT-SIZE-MAX-PX: var(--FONT-SIZE-MAX) * 1px; | |
--COLOR-PRIMARY: palevioletred; | |
--COLOR-SECONDARY: mediumseagreen; | |
/* Uncalculated properties. */ | |
--BROWSER-WIDTH-MIN-PX: (var(--BROWSER-WIDTH-MIN) * 1px); | |
--BROWSER-WIDTH-MAX-PX: (var(--BROWSER-WIDTH-MAX) * 1px); | |
--FONT-SIZE-DIFFERENCE: (var(--FONT-SIZE-MAX) - var(--FONT-SIZE-MIN)); | |
--FONT-SIZE-LOCK: ((100vw - var(--BROWSER-WIDTH-MIN-PX)) / (var(--BROWSER-WIDTH-MAX) - var(--BROWSER-WIDTH-MIN))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment