Works in 3.9.0. Starting with 3.10.0 (tested .1 and .2 as well) the [semantic-ui 2.4.2] build fails:
{ [Error: Cannot create property '_index' on string '!important' in file C:\Scratch\ThrowAwayStuff\bad-semantic\semantic\src\themes\default\collections\table.variables line no. 1]
message:
'Cannot create property \'_index\' on string \'!important\' in file C:\\Scratch\\ThrowAwayStuff\\bad-semantic\\semantic\\src\\themes\\default\\collections\\table.variables line no. 1',
stack: undefined,
type: 'Syntax',
filename:
'C:\\Scratch\\ThrowAwayStuff\\bad-semantic\\semantic\\src\\themes\\default\\collections\\table.variables',
index: NaN,
line: 1,
column: -1,
callLine: NaN,
callExtract: undefined,
extract:
[ undefined,
'/*******************************\r',
' Table\r' ],
lineNumber: 1,
fileName:
'C:\\Scratch\\ThrowAwayStuff\\bad-semantic\\semantic\\src\\themes\\default\\collections\\table.variables',
name: 'Error',
plugin: 'gulp-less',
showProperties: true,
showStack: false,
__safety: { toString: [Function: bound ] } }
Removing the single !important from the variable definition makes it work.
@responsiveCellBoxShadow: none !important;
.test {
box-shadow: @responsiveCellBoxShadow;
}
FWIW I had to revert down to 3.9.x in a project due to what _seems to be_ this same issue, but wasn't able to make a reduced test case at the time. The compiler (using webpack-contrib/less-loader in my case) failed on an !important
used on a variable, and after removing the !important
, the error moved on to the next !important
.
Most helpful comment
Testcase:
Result