muerwre.github.io/docs/api/_content/query/WUiUHbO5Pg.json
2024-03-21 11:24:25 +00:00

1 line
No EOL
9 KiB
JSON

{"_path":"/css/test-if-browser-supports-css-rules","_dir":"css","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Test If Browser Supports CSS Rules","description":"To test if browser supports some #CSS rules, do following:","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@supports (backdrop-filter: blur(5px)) {\n backdrop-filter: blur(5px);\n}\n"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n @supports (\n (-webkit-backdrop-filter: blur(5px)) or \n (backdrop-filter: blur(5px))\n ) {\n @content;\n }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"@mixin can_backdrop {\n @supports (\n (-webkit-backdrop-filter: blur(5px)) or \n (backdrop-filter: blur(5px))\n ) {\n @content;\n }\n}\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To test if browser supports some #CSS rules, do following:"}]},{"type":"element","tag":"code","props":{"code":"@supports (backdrop-filter: blur(5px)) {\n backdrop-filter: blur(5px);\n}\n","language":"css"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a0ae9b"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-112c18"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-226639"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-899a6f"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-a0ae9b"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-509371"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":": blur(5px);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This "},{"type":"element","tag":"code-inline","props":{},"children":[{"type":"text","value":"@mixin"}]},{"type":"text","value":" will only apply rule if browser support backdrop filtering:"}]},{"type":"element","tag":"code","props":{"code":"@mixin can_backdrop {\n @supports (\n (-webkit-backdrop-filter: blur(5px)) or \n (backdrop-filter: blur(5px))\n ) {\n @content;\n }\n}\n","language":"scss"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-a0ae9b"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-0500fd"},"children":[{"type":"text","value":"can_backdrop"}]},{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ae9b"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-8b2965"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-6c59f3"},"children":[{"type":"text","value":"-webkit-backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-8b2965"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-8e2b82"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-8b2965"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-ad4b38"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-7461e6"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-8b2965"},"children":[{"type":"text","value":")) "}]},{"type":"element","tag":"span","props":{"class":"ct-1c5c15"},"children":[{"type":"text","value":"or"}]},{"type":"element","tag":"span","props":{"class":"ct-8b2965"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-112c18"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-226639"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-899a6f"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-a0ae9b"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":" ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-a0ae9b"},"children":[{"type":"text","value":"@content"}]},{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-c4faf2"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-1c5c15{color:#79C0FF}.ct-7461e6{color:#FF7B72}.ct-ad4b38{color:#79C0FF}.ct-8e2b82{color:#79C0FF}.ct-6c59f3{color:#79C0FF}.ct-8b2965{color:#C9D1D9}.ct-0500fd{color:#D2A8FF}.ct-509371{color:#7EE787}.ct-899a6f{color:#79C0FF}.ct-226639{color:#79C0FF}.ct-112c18{color:#79C0FF}.ct-c4faf2{color:#C9D1D9}.ct-a0ae9b{color:#FF7B72}.light .ct-a0ae9b{color:#859900}.light .ct-c4faf2{color:#657B83}.light .ct-112c18{color:#859900}.light .ct-226639{color:#268BD2}.light .ct-899a6f{color:#D33682}.light .ct-509371{color:#268BD2}.light .ct-0500fd{color:#268BD2}.light .ct-8b2965{color:#657B83}.light .ct-6c59f3{color:#859900}.light .ct-8e2b82{color:#268BD2}.light .ct-ad4b38{color:#D33682}.light .ct-7461e6{color:#859900}.light .ct-1c5c15{color:#657B83}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:CSS:Test if browser supports CSS rules.md","_source":"content","_file":"CSS/Test if browser supports CSS rules.md","_extension":"md"}