muerwre.github.io/content/CSS/Test if browser supports CSS rules.md
2022-11-03 10:38:11 +06:00

371 B

To test if browser supports some #CSS rules, do following:

@supports (backdrop-filter: blur(5px)) {
	backdrop-filter: blur(5px);
}

This @mixin will only apply rule if browser support backdrop filtering:

@mixin can_backdrop {
  @supports (
    (-webkit-backdrop-filter: blur(5px)) or 
    (backdrop-filter: blur(5px))
  ) {
    @content;
  }
}