Semantic-UI-LESS
Semantic-UI-LESS copied to clipboard
Certain calc fields not generated correctly
semantic-ui-less 2.4.1 less 3.9.0 Running in a Rails 5.2 app using webpacker 3.5.5.
https://github.com/Semantic-Org/Semantic-UI-LESS/blob/e4395217c1b8b3227c7387284d12f2d9774d33c6/themes/default/elements/step.variables#L98
@borderWidth: 1px;
@attachedHorizontalOffset: -@borderWidth;
@attachedWidth: calc(100% + (-@attachedHorizontalOffset * 2));
results in @attachedWidth
being calc(100% + (--1px * 2))
, which is not valid.
I'm only having this happen in my development environment. Possibly a minifier/compressor is correcting to calc(100% + 2px)
.
Adding this override fixes it:
@attachedWidth: calc(100% + (@attachedHorizontalOffset * -2));
Having the same problem with attached.segment. Solved it temporarily by overriding the theme's variables:
@attachedWidth: calc(~"100% - (" @attachedHorizontalOffset ~"* 2)");
less calculates the value but it should be the expression, not the result of it.
This is fixed in the community fork Fomantic-UI since 2.5.0 by https://github.com/fomantic/Fomantic-UI/pull/97