Created
August 9, 2021 15:50
-
-
Save corypina/4989b3390dd6a2207a38d161a37c8468 to your computer and use it in GitHub Desktop.
Frosted glass effect in CSS
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
.adaptive-glass { | |
--glass-lightness: 100%; | |
background: hsl(0 0% var(--glass-lightness) / 50%); | |
backdrop-filter: blur(40px); | |
@media (prefers-color-scheme: dark) { | |
--glass-lightness: 0%; | |
} | |
} | |
/* Via https://twitter.com/argyleink/status/1423993578787725317 */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment