Skip to content

Commit

Permalink
Merge pull request #383 from nymo/update-doc-for-math-in-4-x
Browse files Browse the repository at this point in the history
Add math option to documentation for Less 4.x
  • Loading branch information
vladikoff authored Nov 3, 2024
2 parents 2a46daa + 3bccb96 commit 606c7e5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
16 changes: 15 additions & 1 deletion docs/less-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 606c7e5

Please sign in to comment.