Skip to content

Instantly share code, notes, and snippets.

@buraksahin59
Created February 23, 2021 08:39
Show Gist options
  • Save buraksahin59/561fa82b07e282c7c17bce5fb56ee9a8 to your computer and use it in GitHub Desktop.
Save buraksahin59/561fa82b07e282c7c17bce5fb56ee9a8 to your computer and use it in GitHub Desktop.
Check backdrop-filter support
/* slightly transparent fallback */
.backdrop-blur {
background-color: rgba(255, 255, 255, .9);
}
/* if backdrop support: very transparent and blurred */
@supports ((-webkit-backdrop-filter: blur(2em)) or (backdrop-filter: blur(2em))) {
.backdrop-blur {
background-color: rgba(255, 255, 255, .5);
-webkit-backdrop-filter: blur(2em);
backdrop-filter: blur(2em);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment