-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add support for media queries #22
Conversation
Looks good to me. 👍 |
|
||
style.walkDecls(function transformDecl(decl) { | ||
if (!decl.value || decl.value.indexOf("calc(") === -1) { | ||
if (!value || !CONTAINS_CALC.test(value)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should stick to a simple indexOf for everything instead of a regexp? (for perf)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's really not going to make any noticeable impact to perf, but I'll do it if you want me to.
I may have missed the reference to media queries support in the spec. |
|
Hum that's true. I was focused on "min-width" :/ |
If I just put this behind a flag could I get it in right away? I really need this to finish migrating stuff from sass to postcss. |
Good idea. You can add a "mediaQueries" (bool) option disabled by default (for now, until we are sure). |
Done |
👍 |
Released as 5.2.0 |
Resolves #21