You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Media queries: parentheses needed even without --strict-math=on #1480
changed the title [-]1.4.1: Parentheses needed even without --strict-math=on[/-][+]Meida queries: parentheses needed even without --strict-math=on[/+]on Sep 5, 2014
changed the title [-]Meida queries: parentheses needed even without --strict-math=on[/-][+]Media queries: parentheses needed even without --strict-math=on[/+]on Sep 5, 2014
Activity
lukeapage commentedon Aug 15, 2013
ah, a bit of a edge case.. we force strict maths on in media queries so that people can use fractions, thanks for raising the issue.
[-]1.4.1: Parentheses needed even without --strict-math=on[/-][+]Meida queries: parentheses needed even without --strict-math=on[/+][-]Meida queries: parentheses needed even without --strict-math=on[/-][+]Media queries: parentheses needed even without --strict-math=on[/+]clayzermk1 commentedon Sep 18, 2015
👍 Also seeing this on less 2.5.1. The suggested workaround of putting parenthesis around the variable in the media query works.
Trivial problem case:
Compiled CSS of trivial problem case (invalid):
Trivial problem case with workaround:
Compiled CSS of trivial problem case with workaround:
andrewnicols commentedon Apr 8, 2016
We're also affected by this in Moodle as this issue affects the stock version 2.3 of bootstrap.
In this case the variable is assigned (https://github.com/twbs/bootstrap/blob/v2.3.2/less/variables.less#L181):
The media-query is (https://github.com/twbs/bootstrap/blob/v2.3.2/less/responsive-navbar.less#L181):
This leads to an output of:
https://tracker.moodle.org/browse/MDL-53152
es6Test commentedon May 21, 2016
I tried doing something like
@media (min-width: @navbarCollapseWidth + 1) { }so as to avoid creating the extra less variable, but this doesn't work, any ideas why?
seven-phases-max commentedon May 21, 2016
Currently parens are required for arithmetic expressions in
@mediastatements, e.g.:es6Test commentedon May 21, 2016
I get an error for
Error loading "app/styles/index.less!$less" from "app/app" at http://localhost:63342/foo/app/app.js Expected ')'"
seven-phases-max commentedon May 21, 2016
You're mixin up
@sm -1and@sm - 1(the first one is not an arithmetic expression but a two value list).do not ignore strict-math:off in media-features