Skip to content

Instantly share code, notes, and snippets.

@ceane
Last active July 9, 2020 13:19
Show Gist options
  • Save ceane/8060746 to your computer and use it in GitHub Desktop.
Save ceane/8060746 to your computer and use it in GitHub Desktop.
SASS Blur Mixin
@mixin blur ($radius) {
-webkit-filter: blur($radius+px); /* Chrome, Safari */
-ms-filter: blur($radius+px); /* IE12? */
filter: url("data:image/svg+xml;utf8,<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><filter id=\"blur\"><feGaussianBlur stdDeviation=\"#{$radius}\" /></filter></svg>#blur"); /* Firefox, Safari, Chrome*/
filter: progid:DXImageTransform.Microsoft.Blur(Strength=$radius); /* IE9 */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment