From 3bccb9697cba08ef8470344793dff207343a45fd Mon Sep 17 00:00:00 2001 From: Gregor Panek Date: Wed, 16 Oct 2024 20:47:13 +0200 Subject: [PATCH] Add math option to documentation for Less 4.x --- README.md | 17 ++++++++++++++++- docs/less-options.md | 16 +++++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 98a9c72..7a8d678 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,27 @@ Default: `false` Force evaluation of imports. -#### strictMath +#### strictMath (deprecated replaced by `Math`) Type: `Boolean` Default: `false` When enabled, math is required to be in parenthesis. + +#### math +Type: `String` +Default: `parens-division` + +Available options: + +| Option | Description | +|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------| +| `always` | Less does math eagerly | +| `parens-division` | No division is performed outside of parens using / operator (but can be "forced" outside of parens with ./ operator - ./ is deprecated) | +| `parens` | Parens required for all math expressions | +| `strict` | Requires brackets for all operations. | + + #### strictUnits Type: `Boolean` Default: `false` diff --git a/docs/less-options.md b/docs/less-options.md index 65a7e2e..bcb3e14 100644 --- a/docs/less-options.md +++ b/docs/less-options.md @@ -38,12 +38,26 @@ Default: `false` Force evaluation of imports. -## strictMath +## strictMath (deprecated replaced by `Math`) Type: `Boolean` Default: `false` When enabled, math is required to be in parenthesis. +## math +Type: `String` +Default: `parens-division` + +Available options: + +| Option | Description | +|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------| +| `always` | Less does math eagerly | +| `parens-division` | No division is performed outside of parens using / operator (but can be "forced" outside of parens with ./ operator - ./ is deprecated) | +| `parens` | Parens required for all math expressions | +| `strict` | Requires brackets for all operations. | + + ## strictUnits Type: `Boolean` Default: `false`