muerwre.github.io/docs/api/_content/query/WUiUHbO5Pg.json
2023-03-16 13:32:51 +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-6a8071"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-afae94"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-51418e"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f2a04c"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-6a8071"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":")) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-23a8f4"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":": blur(5px);"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"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-6a8071"},"children":[{"type":"text","value":"@mixin"}]},{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-4bf135"},"children":[{"type":"text","value":"can_backdrop"}]},{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":" {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6a8071"},"children":[{"type":"text","value":"@supports"}]},{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":" ("}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-9efff5"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-3d0bdf"},"children":[{"type":"text","value":"-webkit-backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-9efff5"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-685787"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-9efff5"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-a50fb7"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-3d56a5"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-9efff5"},"children":[{"type":"text","value":")) "}]},{"type":"element","tag":"span","props":{"class":"ct-bf4bf4"},"children":[{"type":"text","value":"or"}]},{"type":"element","tag":"span","props":{"class":"ct-9efff5"},"children":[{"type":"text","value":" "}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"class":"ct-afae94"},"children":[{"type":"text","value":"backdrop-filter"}]},{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":": "}]},{"type":"element","tag":"span","props":{"class":"ct-51418e"},"children":[{"type":"text","value":"blur"}]},{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"class":"ct-f2a04c"},"children":[{"type":"text","value":"5"}]},{"type":"element","tag":"span","props":{"class":"ct-6a8071"},"children":[{"type":"text","value":"px"}]},{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":"))"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":" ) {"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-6a8071"},"children":[{"type":"text","value":"@content"}]},{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":";"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":" }"}]}]},{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-e7b4ca"},"children":[{"type":"text","value":"}"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-bf4bf4{color:#79C0FF}.ct-3d56a5{color:#FF7B72}.ct-a50fb7{color:#79C0FF}.ct-685787{color:#79C0FF}.ct-3d0bdf{color:#79C0FF}.ct-9efff5{color:#C9D1D9}.ct-4bf135{color:#D2A8FF}.ct-23a8f4{color:#7EE787}.ct-f2a04c{color:#79C0FF}.ct-51418e{color:#79C0FF}.ct-afae94{color:#79C0FF}.ct-e7b4ca{color:#C9D1D9}.ct-6a8071{color:#FF7B72}.light .ct-6a8071{color:#859900}.light .ct-e7b4ca{color:#657B83}.light .ct-afae94{color:#859900}.light .ct-51418e{color:#268BD2}.light .ct-f2a04c{color:#D33682}.light .ct-23a8f4{color:#268BD2}.light .ct-4bf135{color:#268BD2}.light .ct-9efff5{color:#657B83}.light .ct-3d0bdf{color:#859900}.light .ct-685787{color:#268BD2}.light .ct-a50fb7{color:#D33682}.light .ct-3d56a5{color:#859900}.light .ct-bf4bf4{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"}