Last active
March 15, 2017 05:06
-
-
Save antife-yinyue/f517feea3fcf48dc6c3f to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
@import 'base.sass/+'; | |
$z-layers: ( | |
'goku': 9001, | |
'shoryuken': 8000, | |
'modal': ( | |
'base': 500, | |
'close': 100, | |
'header': 50, | |
'footer': 10 | |
), | |
'default': 1, | |
'below': -1, | |
'bottomless-pit': -9000 | |
); | |
@function z($layer...) { | |
@if not map-has-key($z-layers, $layer...) { | |
@warn 'No layer found for `#{$layer}` in $z-layers map. Property omitted.'; | |
} | |
@return map-get($z-layers, $layer...); | |
} | |
.modal { | |
position: absolute; | |
z-index: z(modal, base); | |
.close-button { | |
z-index: z(modal, close); | |
} | |
header { | |
z-index: z(modal, header); | |
} | |
footer { | |
z-index: z(modal, footer); | |
} | |
} | |
.goku { | |
z-index: z(goku); | |
} |
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
.modal { | |
position: absolute; | |
z-index: 500; | |
} | |
.modal .close-button { | |
z-index: 100; | |
} | |
.modal header { | |
z-index: 50; | |
} | |
.modal footer { | |
z-index: 10; | |
} | |
.goku { | |
z-index: 9001; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment