Created
June 13, 2014 18:15
-
-
Save non-carbondated/9868ba071b38856bd27a 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
// ---- | |
// Sass (v3.3.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
// Example based on http://www.smashingmagazine.com/2014/06/12/sassy-z-index-management-for-complex-layouts/ | |
// This example reduces effort and required code by using @each and #{} to make updating a z-index list the only effort needed. | |
$elements: project-covers, user-tooltip, sorting-bar, modals, navigation; | |
$modal-elements: field, form-controls, error, autocomplete-dropdown; | |
.modal { | |
z-index: index($elements, modals); | |
@each $el in $modal-elements { | |
.#{$el} { | |
z-index: index($modal-elements, $el); | |
} | |
} | |
} |
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 { | |
z-index: 4; | |
} | |
.modal .field { | |
z-index: 1; | |
} | |
.modal .form-controls { | |
z-index: 2; | |
} | |
.modal .error { | |
z-index: 3; | |
} | |
.modal .autocomplete-dropdown { | |
z-index: 4; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment