Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Output conditional style only into the conditional stylesheet #4

Closed
polikin opened this issue Nov 6, 2013 · 3 comments
Closed

Output conditional style only into the conditional stylesheet #4

polikin opened this issue Nov 6, 2013 · 3 comments

Comments

@polikin
Copy link

polikin commented Nov 6, 2013

It it possible to output only the conditional style in my conditional stylesheet? Because, I don't want to add weight to my conditional sheet. The only thing I want is the fix I did for IE.

Ex:

.exemple {
    width: 100px;
    height: 300px;

    @include jacket(ie8) {
        width: 200px;
    }
}

output css:

screen.css

.exemple {
    width: 100px;
    height: 300px;
}

ie8.css

.ie8 .exemple {
    width: 200px;
}

rather than

screen.css

.exemple {
    width: 100px;
    height: 300px;
}

ie8.css

.exemple {
    width: 100px;
    height: 300px;
}

.ie8 .exemple {
    width: 200px;
}
@robwierzbowski
Copy link
Contributor

Unfortunately Sass doesn't work that way — I think it's mostly discussed in this issue: sass/sass#241

Currently conditional style mixins like Jacket and Breakpoint create complete stylesheets which you conditionally supply to your browsers. Give IE8 only the IE8 stylesheet (with conditional comments), and the same with the standards browsers.

@polikin
Copy link
Author

polikin commented Nov 6, 2013

Thanks!

@robwierzbowski
Copy link
Contributor

No problem 😄

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants