Semantic-Org / Semantic-UI

Semantic is a UI component framework based around useful principles from natural language.
http://www.semantic-ui.com
MIT License
51.07k stars 4.96k forks source link

v2.5.0: Build reporting less compile issues #7095

Open mcrawshaw opened 1 year ago

mcrawshaw commented 1 year ago

Due to updates in the less dependency some math operations are more strict (https://github.com/less/less.js/releases/tag/v4.0.0).

Steps

Build semantic

Actual Result

[PluginError: Error evaluating function `unit`: the first argument to unit must be a number. Have you forgotten parenthesis? in file ./semantic/src/themes/default/globals/site.variables line no. 393] {
  stack: undefined,
  type: 'Argument',
  filename: './semantic/src/themes/default/globals/site.variables',
  index: 10061,
  line: 393,
  column: 19,
  callLine: NaN,
  callExtract: undefined,
  extract: [
    '*/',
    '@mini            : unit( round(@miniSize * @emSize) / @emSize, rem);',
    '@tiny            : unit( round(@tinySize * @emSize) / @emSize, rem);'
  ],
  lineNumber: 393,
  fileName: './semantic/src/themes/default/globals/site.variables',
  __safety: { toString: [Function: bound ] },
  _stack: undefined,
  plugin: 'gulp-less',
  showProperties: true,
  showStack: false
}

Version

2.5.0

Recommendation

There are a couple of updates needed in the theme less files. Wrap division expressions in parentheses and variables prefixed with negative signs must also be wrapped.

soilsk commented 1 year ago

For now ... maybe: npm install less@3.7.1 --save-dev ?