-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Calculations in media query declarations no longer work #3265
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
Comments
I can't replicate that. What I get is: // input
@media screen and (min-width: (@some-var + 1)) {
.selector {
foo: bar;
}
}
// output
@media screen and (min-width: (60px + 1)) {
.selector {
foo: bar;
}
} Like calc() in 3.0, inline expressions are not math'd in media queries in 3.5, which avoids |
@JamesDonnelly I've updated the changelog to reflect that this is an intentional change for at-rules to fix other issues regarded inline math for at-rules. |
@JamesDonnelly FYI I've reverted this change in operations for |
Related to #1880 |
Today I upgraded a project of mine from LESS 3.0.4 to 3.5.0.
In LESS 3.0.4, the following was perfectly valid:
However in 3.5.0, the
@some-var + 1
part means this entire media query gets excluded from the compiled CSS as if it never existed. No errors are given in the build console (compiling using Webpack and less-loader (neither of which were also updated today)).I've worked around it for now by performing the calculation on a separate
@some-var-plus-one
variable:I'm not sure if this is a bug or if this is something intentional.
The text was updated successfully, but these errors were encountered: