Skip to content

Instantly share code, notes, and snippets.

@jarodreyes
Created April 17, 2015 19:10
Show Gist options
  • Save jarodreyes/c2901dd2bc354c97b3e7 to your computer and use it in GitHub Desktop.
Save jarodreyes/c2901dd2bc354c97b3e7 to your computer and use it in GitHub Desktop.
Prevent scroll when user is not in focus mode
// 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