Created
April 17, 2015 19:10
-
-
Save jarodreyes/c2901dd2bc354c97b3e7 to your computer and use it in GitHub Desktop.
Prevent scroll when user is not in focus mode
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
// Before the user is in 'focus' mode. | |
.cw-code, .cw-prose { | |
&:after { | |
content: " "; | |
display: block; | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
top:0px; | |
left:0px; | |
background:rgba(0,0,0,0.25); | |
text-align: center; | |
padding-top: 30%; | |
color: @offWhite; | |
overflow-y: hidden; | |
} | |
} | |
// Allow scroll once we are in 'focus mode' | |
&.focus { | |
.cw-code, .cw-prose { | |
&:after { | |
display:none; | |
} | |
} | |
.cw-code { | |
&.resizing::after { | |
content: "\2190 resizing \2192"; | |
display: block; | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
top:0px; | |
left:0px; | |
background:rgba(0,0,0,0.75); | |
text-align: center; | |
padding-top: 30%; | |
color: @offWhite; | |
z-index: @zindex-top; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment