Using the url prefix @ -moz-document for the target Firefox in SCSS

Is there an easy way to use "@ -moz-document url-prefix ()" to install on Firefox in SCSS documents.

I tried the following, but the parent link "&" does not work in this context.

#nav li{ display: table-cell; @-moz-document url-prefix(){ & { display: inline-block; } } } 
+4
source share
1 answer

I run into small problems from time to time. I mainly use this method to fix IE8. Here is my fix:

First I install: https://github.com/rafaelp/css_browser_selector

This gives me a browser and rendering classes for each browser:

 <html class="gecko firefox firefox26 mac"> 

Then in my SCSS I can do this:

.foo {display: block; .firefox and {display; no one; }}

This example hides .foo in Firefox. Using a and after the selector, a tree is scanned. Isn't SASS amazing?!?!?

Alternatively, install a script and create a separate firefox.scss and just run it like this:

 .firefox { // Do stuff here } 

As a rule, finding functions using something like Modernizr is easier than for certain browsers, but sometimes you have to solve various browser problems.

0
source

Source: https://habr.com/ru/post/1500612/


All Articles