Skip to content

Instantly share code, notes, and snippets.

@israelst
Created January 2, 2019 00:32
Show Gist options
  • Save israelst/8656a5b8e6a782ea6e7e413b7eb51f87 to your computer and use it in GitHub Desktop.
Save israelst/8656a5b8e6a782ea6e7e413b7eb51f87 to your computer and use it in GitHub Desktop.
Overlay
.overlay{
position: relative;
}
.overlay > *{
position: relative;
z-index: 1;
}
.overlay:before{
content: '';
position: absolute;
height: 100%;
width: 100%;
opacity: 0.3;
z-index: 0;
}
.overlay.dark:before{
background-color: #000;
color: #fff;
}
.overlay.dark{
color: #fff;
}
.overlay.light:before{
background-color: #fff;
}
.overlay.light{
color: #000;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment