Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

import css inside media queries #566

Closed
ghost opened this issue Jan 12, 2012 · 4 comments
Closed

import css inside media queries #566

ghost opened this issue Jan 12, 2012 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 12, 2012

Hi,

I would like to have some kind of functionality where I can include CSS/LESS-files within @media queries. Just copy the @import function and allow it inside media queries and we're all set. :)

For example:

@media screen {
    @include "default.less"
    @include "fancybox.css"
}

Keep up the good work!

@ghost ghost closed this as completed Jan 12, 2012
@ghost ghost reopened this Jan 12, 2012
@sergeylukin
Copy link

I think same feature already requested in: #560

@joeldrapper
Copy link

You can do this already but only with .less files. Issue #560 already requests imports to support CSS as mentioned above.

@media screen and (max-width: 500px) {
    @import "test.less";
}

@D-system
Copy link

D-system commented May 4, 2012

In the case it's not possible to change the extension to .less, how can I do ?

@lukeapage
Copy link
Member

new options "inline" and "less" allow you to pull css in this way or treat a css file like a less file.

so the only thing left for this request is to convert

@media screen and (max-width: 500px) {
    @import "test.css";
}

into

@import "test.css" screen and (max-width: 500px);

@lukeapage lukeapage removed this from the 1.6.0 or 2.0.0 milestone Oct 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants