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

Parameter math needs to be updated in documentation for less 4.x #362

Open
wysiwyg-dirk opened this issue Sep 29, 2021 · 1 comment · May be fixed by #383
Open

Parameter math needs to be updated in documentation for less 4.x #362

wysiwyg-dirk opened this issue Sep 29, 2021 · 1 comment · May be fixed by #383

Comments

@wysiwyg-dirk
Copy link

After updating from an older to the current version (3.0.0) I noticed that old Math functions do not work anymore (e.g. padding: 30px / 2 will be create output padding: 30px / 2 instead of padding: 15px). To get it back to run, I looked into the current documentation of less v4 and needed to replace the configuration-option strictMath:false with math: 'always'. this worked for the old code (calculations without parens).

This is due to an update to less 4, which I found in your changelog.

strictMath is depracted (and does not work correctly anymore)

math has the following options:

  • always (3.x default) - Less eagerly does math
  • parens-division (4.0 default) - No division is performed outside of parens using / operator (but can be "forced" outside of parens with ./ operator - ./ is deprecated)
  • parens | strict - Parens required for all math expressions.
  • strict-legacy (removed in 4.0) - In some cases, math will not be evaluated if any part of the expression cannot be evaluated.

Further information can be found here: https://lesscss.org/usage/#less-options-math

@webian
Copy link

webian commented Oct 23, 2021

Thank you @wysiwyg-dirk for helping me find this math: 'always' option!

@nymo nymo linked a pull request Oct 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants