GithubHelp home page GithubHelp logo

if-ie.styl's Introduction

if-ie.styl Build Status NPM version

The Stylus way to divide code for IE and for others

if-ie.styl is not a library — but a methodology of splitting the styles for IE and for other browsers. The profits of it are the reduced number of requests — one for each browser, the reduced size of each stylesheet — each browser would get only what it needs, and the faster and easier way to write hacks for ie. More on the features below.

This is the addition to the great CSS Preprocessor Stylus.

Table of Contents

  1. Install
  2. Usage
  3. Features

Install

  1. Clone if-ie.styl somewhere to your project

git clone git://github.com/kizu/if-ie.styl.git


2. Include it in your `.styl` project:

    ``` CSS
@import "if-ie.styl/if-ie"
Note, that if you want to use [nib](https://github.com/visionmedia/nib/) or any other similar library, you should import `if-ie.styl` *after* them, so for a project with nib it would look that way:

``` CSS

@import "nib" @import "if-ie.styl/if-ie"


3. Use it!

## Usage

Well, the basics of this lib are simple — you can use the `ie` variable in a way, where you could write hacks for it in a main stylesheet and then get two compiled versions — one for all modern browsers and other — only for ie.

That goes that way:

1. You create a master stylesheet, like `style.styl`, where you'd import the `if-ie.styl`, any other libs or files and where you'd write your main css.

2. Then you create the `style_ie.styl` near the main stylesheet with such content:

    ``` CSS
ie = true
@import "if-ie.styl/if-ie"
@import "style.styl"
Note that `ie = true` must be declared _before_ imports, so [Redefining mixins](#redefining-mixins) would work.
  1. Compile those .styl files to style.css and style_ie.css.

  2. You include your styles like this in HTML's head:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7,IE=edge" />

<!--[if gt IE 7]><!-->
  <link rel="stylesheet" href="style.css" />
<!--<![endif]--><!--[if lt IE 8]>
  <link rel="stylesheet" href="style_ie.css" />
<![endif]-->

There are two things to mention:

  • The main thing: there are conditional comments that tells each browser to get only one stylesheet. So, basically, we get only one request per browser, even for IE, yay!
  • I use the meta to convert IE8 to the IE7 mode: IE8 is not ideal and it's much easier to have only one version if IE in testing. Also, IE7 renders CSS strangely faster than IE8. And there are a lot of other things too.

Features

ie variable

You can use the ie variable to filter some content, so you could easily say to ie or to all other browsers which properties or blocks of rules to use.

It goes easy as this:

.foo
  box-shadow: 0 0 3px #000
  border: 1px solid #000 if ie

You can see the if ie part — it tells Stylus to use this rule only if there were ie variable set. This variable is false by default, but if you'd use the method described above, this variable would be true in style_ie.styl, so you'd get those styles only in IE.

And as this is just regular Stylus' variable, you can use negation with it to write down styles only for modern browsers, so, you can do this:

if !ie
  @media (min-width: 500px)
    // Some responsive stuff goes here

and you won't get all those styles in the stylesheet for IE! Some bytes saved.

zoom

if-ie.styl redefined the zoom property, so it would show up only in IE. Basic stuff, but now you won't get it for your normal browsers, so you could use it straight away in a regular strylesheet when you need to fix something with it!

inline-block

Since IE supports display: inline-block only for initially inline elements, if-ie.styl provides a transparent mixin to make it work for every element.

So, when you would write display: inline-block, IE would get display: inline; zoom: 1; everytime. You could say that we won't need it for initially inline blocks, but hey! Look at this:

display:inline-block;
display:inline;zoom:1;

The fallback for IE is just 1 (one) extra byte, so it won't make things that bad. Actually, that would make it so your code would be more reusable, 'because you won't need to worry if the element is block level from the start.

Also, if-ie.styl overrides the display in a way it won't break any other overrides any other plugin could have done to display. So you can safely use it with nib or any other set of mixins.

Redefining mixins

With if-ie.styl you could use your CSS3 mixins in a way that wouldn't bloat the IE stylesheet. Some extra bytesaving here :)

So, if you have such mixin:

border-radius()
  -webkit-border-radius: arguments
  border-radius: arguments

And then you want to use it:

.test
  width: 10px
  border-radius: 5px

you would get it's content in modern browsers, but what would IE get? It would get this:

.test {
  width: 10px;
}

Right now almost all of the nib's mixins are covered. Also, the text-shadow is stripped from IE.

There are still a lot of similar things to do (like removing the vendored gradients in IE etc.), so stay tuned!

rgba-ie()

And now, the best part (well, the part I needed in my project and the one that can be really useful) — the function rgba-ie().

While IE don't understand the regular rgba, you could often want it to have some fallback. People often use multiple props like

.foo {
  color: #808080;
  color: rgba(0,0,0,0.5);
}

but it's not an easy task to determite which color to use with that special rgba, and also there are a lot of CSS-minifiers that could strip such repeating properties.

rgba-ie to the resque! It is the copy of the plain rgba function CSS and Stylus provide, but with a twist: if there is a ie variable set, this function would fallback to the default background (#FFF for now, but it would be global var someday) or to any other color, specified as the last argument in the function. And all the normal browsers would get the plain rgba.

You can use it like this:

.foo
  color: rgba-ie(0,0,0,0.5)
.bar
  background: rgba-ie(#FFDE00, .42, #19C261)

this would render to this in normal browsers (offtopic: see the way Stylus gives you a way to use hex in rgba? Awesome!):

.foo {
  color: rgba(0,0,0,0.5);  
}
.bar {
  background: rgba(255,222,0,0.42);
}

but to this in IE:

.foo {
  color: #808080;
}
.bar {
  background: #7ace38;
}

Yay, magic! You can try to create a layer with rgba(255,222,0,0.42) over a #19C261 background and then use a colorpicker to see that it's actually the #7ace38 color!

And, of course, you can redefine the default fallback to any other color using $default_rgba_fallback variable:

$default_rgba_fallback = lime

Clip support

if-ie.styl adds support for clip property, more precisely, for the rect() value syntax. The spec says there must be commas between it's arguments, but IE understands only space-separated arguments. So, if-ie.styl handles this and you can write your rects like you want — in the result there would be commas for modern browsers and spaces for IE. So,

.foo
  clip: rect(0, auto, auto, 0)

would become this in IE:

.foo {
  clip: rect(0 auto auto 0);
}

Simple nth-child support

feature inspired by this codepen

You can use simple (with generic numbers) nth-child that would work in IE. To do this you need to call it in that way:

{nth-child(".foo", 3)}
  background: blue

You can see that the nth-child function goes in the interpolation. The first argument is the selector, the second is the counter of the child. Using the n in the counter is not available yet.

This code would produce this in normal browsers:

.foo:nth-child(3) {
  background: #00f;
}

and this in IE:

:first-child + * + .foo {
  background: #00f;
}

As a word of warning: such selectors can be bad for performance, so use this nth-child substitution at your own risk!

{lte_ie9} selector

Sometimes you would want to write some styles both for OE9 and for older IE. Since IE9 would get the normal styles, the usual way of doing so would require copy-and-pasting. However, if-ie.styl prodides a nice shortcut for doing so: just prepend your rules by {lte_ie9} selector! That selector would render to nothing in older IEs, but in styles for normal browsers it would render to the .ie9 selector instead.

In that way you could use Modernizr, conditional comments or any other way to set that class only in ie9 and everything would work smoothly.

Sample usage:

{lte_ie9}
  .test
    width: 10px

Older IE would get just the .test selector, while IE9 would get .ie9 .test.

You can redefine the class used for determining ie9 by defining the ie9_class class before including if-ie.styl like this:

ie9_class = 'IE_9'
@import "if-ie.styl/if-ie"
@import "style.styl"

To be continued!

Id you'd like to follow on the if-ie.styl progress, follow me on twitter.


Copyright (c) 2012 Roman Komarov [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

if-ie.styl's People

Contributors

kizu avatar tyranron avatar

Stargazers

 avatar Shawn Yee avatar Henrik Våglin avatar  avatar Pedro Moreira avatar  avatar Kirill Volkovich avatar bogdan avatar Александр Логинов-Солоницын avatar boguslav avatar Andrew Sherstobitov avatar  avatar  avatar Valerii Baleiko avatar forestcat avatar  avatar lichin-lin avatar Konstantin Epishev avatar Monoceros avatar Ann avatar Andrey Gurtovoy avatar Franklin Javier avatar Jan-T. Brinkmann avatar Alex Ketch avatar Geuargiy avatar wupeng avatar  avatar  avatar Ilia Reshetnikov avatar Daniel Box avatar Josh Bertrand avatar Pavel Lautsevich avatar Oleg Butovich avatar Olga avatar Diogo Moretti avatar Pavel V. Sysolyatin avatar Sergei Toroshchin avatar YAMAGUCHI EIKICHI avatar Alexey Sosnovsky avatar Jo Dahl avatar Charleno Pires avatar den avatar Arian avatar Dafrok avatar Serhii Marchuk avatar Aleksandr avatar Zoxon avatar Artem Zinoviev avatar Artem Komarov avatar Don avatar  avatar Eduard Kozachok avatar Chernyavsky Andrew avatar Mansur Gabidullin avatar  avatar John Doe avatar  avatar april avatar Philipp avatar diéssica avatar Talgat Uspanov avatar ☮ avatar Alexander Verkhoglyad avatar Ant Polyakov avatar Maks Sherstobitow avatar  avatar 斯人 avatar  avatar Igor Mukhin avatar 像树一样成长! avatar Михаил Оськин avatar Olivia Ly avatar ianva avatar Roman Mezentsev avatar Mai Hou avatar Ivan Verevkin avatar Jeff Escalante avatar Stefan Thon avatar Cory Simmons avatar Eric Wallmander avatar Bryant Teja avatar Arthur Budko avatar Anatoly Ostrovsky avatar Pavel avatar Max Musatov avatar Dmitry Kiselyov avatar Vitor Carlos avatar xiamidaxia avatar Remmi avatar Vadim Sikora avatar Arnout Kazemier avatar Iuly avatar Alex Lobashev avatar Vadym Borodin avatar Philippe Rigovanov avatar Maxim Filatov avatar Shmavon Gazanchyan avatar Alexander Burtsev avatar Neuron avatar Andrey Eroftiev avatar

Watchers

 avatar Katia Gutman avatar Maks Sherstobitow avatar Ant Polyakov avatar Shmavon Gazanchyan avatar James Cloos avatar Vladimir Bolshakov avatar Sergey Khokhlov avatar den avatar  avatar

if-ie.styl's Issues

Fallbacks for multiple backgrounds and gradients

There could be a lot of ways to handle multiple backgrounds and gradients in IE:

  1. We could strip them at all.
  2. We could make smallest invalid value for background-whatever, so it would be discarded by ie (test it).
  3. We could remove only the parts that IE don't understand, saving the bg-color for gradients and the first/last image in multiple bgs.
  4. We could try to determine the average color from the gradient by ourselves and add it as a substitute.
  5. etc.

Maybe there could be some option that would tell IE how to handle specific situations?

Add fallback for multiple backgrounds

Since IE don't support multiple backgrounds, we could create fallbacks for such places, like throwing away all the images except the top one (maybe there could be a flag to say which image to keep)?

Upgrade the color blending function

If this function would go to Stylus, then use it. If not, upgrade it to the one that would be the latest one I'll do. Current can only do normal blending and don't blend the alpha.

ie9 + general ie?

Sometimes you would want to write the same fixes for ie7-9, but the ie9 have the same styles as everyone.

The solution is to use mordernizr or conditional comments to set ie9 class to the <html> and then use the .ie9 class in CSS.

For this we could add such way to write code for ie:

$ie_lte9 = ie ? '' : '.ie9 '

{$ie_lte9}
  .foo
    width: 10px

That would render to just .foo {…} in ie7-8, and to .ie9 .foo {…} in the main stylesheet.

opacity helper

This issue must have more attentions, 'cause I have some thoughts on it. There is a nice roundup on this. That's how it was done in nib.

Maybe we should look if the opacit is function and just set the support-for-ie? Or we should do some other things? Should we add zoom: 1; to ie?

Add global fallback variable

Right now the default fallback is defined in the rgba-ie function. It must be defined in a way ie is, so users could redefine it if needed.

Fallback for box-sizing

At least for simple cases we could override box-sizing property if it goes after all the box props, using them, computing and overriding.

Only IE

How do I remove everything, except the properties with if ie at the end?

The goal is to have ie stylesheet composed of ie-only styles.

inline-block wrapper?

Do we need it? Do we need to set display: inline always? Maybe we should have inline-block-ie like we have rgba-ie?

Without it we'd need to write that in case we have a block:

.foo
  display: inline-block
  display: inline if ie
  zoom: 1

Anyway, if we're declaring independance on blocks, then we could do this always for ie.

Add fallbacks for gradients

Since old IE don't support gradients, we could automatically create a fallback mixing the color stops of the gradients together.

However, the question is: should we do that only to IE7 or for IE9 too? IE9 don't support gradients, so we should give the fallback for it in the main stylesheets.

`transparent` and `rgba-ie`

Do we need to fiddle with transparent keyword? Do we need things like rgba(0,0,0,0) become transparent in ie?

We can't replace transparent always with rgba(0,0,0,0), 'cause of gradients, transitions etc.

Expressions for ie?

with stylus it could be easy to add different ie expressions for different things in ie.

I could try and move some things from my IExpr to if-ie.styl.

The obvious ones are replacement for content in pseudo-elements (however, we couldn't make .before and .after elements automagically), :target, :checked, :focus and similar ones.

If we would look into adding fixes for ie6, then there'd be also :hover, min/max-width, and trbl-positioning fixes.

Allow zoom to be propagated to normal browsers

@lusever mentioned that while zoom property could be used in normal browsers there should be a way to use it there. And as in IE you'll always use the 1 value, we could only strip this property when the value is equal to 1.

Maximum stylus call stack size exceeded

There is a problem with inline-block feature. A simple example:

includes/reset.styl
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section
  display: block
main.styl
@import 'includes/if-ie/if-ie.styl'
@require 'includes/reset.styl'
main.ie.styl
ie = true
@import 'includes/if-ie/if-ie.styl'
@import 'main.styl'

Compile result:

RangeError: .compile/stylus/includes/if-ie/if-ie.styl:30
   26|     display: inline args
   27|     zoom: 1
   28|   else
   29|     if type(display_previous) == "function"
 > 30|       display_previous(arguments)
   31|     else
   32|       display: arguments
   33| 

Maximum stylus call stack size exceeded
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at display() (.compile/stylus/includes/if-ie/if-ie.styl:26)
    at "article" (.compile/stylus/includes/reset.styl:249)

Without main.ie.styl file everything compiles just fine.
I'm new to stylus and cannot find a way to fix it now. So, please, help.

Media queries and IE?

We could do something like this, or anything similar, so we could use media-queries without the need to double the styles for IE etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.