Skip to content

Instantly share code, notes, and snippets.

@omar2205
Created October 20, 2020 04:21
Show Gist options
  • Save omar2205/138d35e55bd65e144474649171fed571 to your computer and use it in GitHub Desktop.
Save omar2205/138d35e55bd65e144474649171fed571 to your computer and use it in GitHub Desktop.
css backdrop blur with sharp edges

css

background-color: rgba(0,0,0,.8);
backdrop-filter: url(#sharpBlur) saturate(180%);

html

<svg class="hideSvgSoThatItSupportsFirefox">
  <filter id="sharpBlur">
    <feGaussianBlur stdDeviation="30"></feGaussianBlur>
    <feColorMatrix type="matrix" values="1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 9 0"></feColorMatrix>
    <feComposite in2="SourceGraphic" operator="in"></feComposite>
  </filter>
</svg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment