Last active
December 10, 2018 19:57
-
-
Save VitorLuizC/7faae99447b33701cbcc1e5f642671e8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| position( | |
| $position, | |
| $top = null, | |
| $right = $top, | |
| $bottom = $top, | |
| $left = $right | |
| ) | |
| position: $position | |
| top: $top | |
| right: $right | |
| bottom: $bottom | |
| left: $left |
This file contains hidden or 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 'position-shorthand.styl' | |
| .c-modal | |
| body.c-modal-active > & | |
| display: block | |
| & | |
| display none | |
| position: fixed 0 | |
| > .panel | |
| position: fixed 50% 50% initial initial | |
| > .background | |
| position: relative 50% 25% | |
| background-color: rgba(#000, .75) |
This file contains hidden or 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
| body.c-modal-active > .c-modal { | |
| display: block; | |
| } | |
| .c-modal { | |
| display: none; | |
| position: fixed; | |
| top: 0; | |
| right: 0; | |
| bottom: 0; | |
| left: 0; | |
| } | |
| .c-modal > .panel { | |
| position: fixed; | |
| top: 50%; | |
| right: 50%; | |
| bottom: initial; | |
| left: initial; | |
| } | |
| .c-modal > .background { | |
| position: relative; | |
| top: 50%; | |
| right: 25%; | |
| bottom: 50%; | |
| left: 25%; | |
| background-color: rgba(0,0,0,0.75); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment