internet explorer - Separating styles into different CSS files from a single Stylus source file -
I use this technique to create IE conditional stylesheets during development:
< / P>
Actually this allows me to write IE specific CSS with non-IE styles and it will be split into a new file automatically, for the most part it has been great but if I am about it I want to change one thing, it creates 2 full copies of CSS files, just one The copy also has an additional IE-specific style.
So if I do something like this in stylus
/ * styles.styl * / .mydiv + i.e. (8) width: 100px background: # 000 Color: red . Other display: block width: 10px
I want to see 2 files like this:
/ * styles.css: * / .mydiv {background : # 000; Red color; }. Other {display: block; Width: 10px; } / * Styles- ie8.css: Just IE specific style * / .mydiv {width: 100px; }
Instead of styles- ie.css ends up with:
/ * styles- ie8.css: * / .myDiv {width: 100px; / * & Lt; - Includes additional IE-specific style with everything else / background: # 000; Red color; }. Other {display: block; Width: 10px; }
If it is possible then just curious, thanks!
I do not believe that your remaining stylus is At the clock we had to face the same problem - serving a stylesheet on every browser, with only Xtra to go to IE8 in a different stylesheet. Unfortunately we can not find a decent way to handle it. As you've mentioned, there is a complete copy of the styles in the IE8 stylesheet, what we currently do with the IE8 specific style. The advantage of this is that now we only need to send a stylesheet to IE8 users, they have to save an HTTP request as compared to the above method. Get good browsers including IE 9, get only It is not a solution that is not a solution for you, but at least this is a bit of logic behind our decisions. + not-ie () style blends (not explicitly recommended), or stretching the stylus in some way.
& lt ;! - [gt gt gt] 8] & gt; & Lt ;! - & gt; Link (rel = 'stylesheet', href = 'index.css') & lt ;! - & lt ;! [Andif] - & gt; & Lt ;! - [If lte IE 8] & gt; Link (rel = 'stylesheet', href = 'index-ie8.css') & lt ;! [Endif] - & gt;
index.css
IE8 and less index-ie8.css
only
Comments
Post a Comment