Created
October 3, 2022 11:45
-
-
Save nicubarbaros/3a5a1a769377a8a87054acaadfe4f238 to your computer and use it in GitHub Desktop.
z-index mixin
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
@function z($name) { | |
@if index($z-indexes, $name) { | |
@return (length($z-indexes) - index($z-indexes, $name)) + 1; | |
} @else { | |
@warn 'There is no item "#{$name}" in this list; choose one of: #{$z-indexes}'; | |
@return null; | |
} | |
} | |
$z-indexes: ( | |
"outdated-browser", | |
"modal", | |
"site-header", | |
"page-wrapper", | |
"site-footer" | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment