Last active
July 15, 2020 19:29
-
-
Save Kurtz1993/1357003b77e91f0086876e613ab4302a to your computer and use it in GitHub Desktop.
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
/** | |
* | |
* Makes working with themeable CSS variables easier. | |
* | |
* $property: the CSS property to theme. | |
* $cssVariable: The CSS variable that will store the themed value. | |
* $fallback: The value to use as a fallback but as well for the CSS variable default value. | |
*/ | |
@mixin themeable($property, $cssVariable, $fallback) { | |
#{$property}: #{$fallback}; | |
#{$property}: var(--#{$cssVariable}, #{$fallback}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment