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

Fixes #3205, partial 3.0 math regression #1880 #3228

merged 5 commits into from Jun 27, 2018


None yet
1 participant

matthew-dean commented Jun 24, 2018

This PR does the following:

  • Fixes #3205 - Mixin args not visited by visitor
  • Improves permissive parsing quite a bit - first parses a stream of parseable entities (vars, function calls, but not math expressions*), and if that doesn't work, drops back to permissive parsing for the rest. This ensures that permissive parsing doesn't re-break #3205 when released, as permissive was previously parsing the @bar in --foo: @bar as an escaped quoted value. Instead, it returns the expected Variable node, and visitVariable will continue to work on the pre-eval test
  • Fixes the apparent math regression in 3.0 where media queries were, for a time in 2.x, I guess, not evaluating 16/9 as math? (See: jonycheung/deadsimple-less-watch-compiler#69) Now, media queries parse as a permissive value, which doesn't perform math operations. This doesn't "fix math" whatsoever, it just makes a @media behave more consistently with other at-rules (with this update), which don't allow math either.
  • The reason that permissive parsing doesn't parse math expressions is that they're too ambiguous and also hard for the parser to recover from. A custom property could, for example, contain a math expression that's not intended as "Less math".

@matthew-dean matthew-dean added this to the 3.5 milestone Jun 25, 2018

@matthew-dean matthew-dean merged commit 566f428 into less:master Jun 27, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment