Semantic-UI-LESS icon indicating copy to clipboard operation
Semantic-UI-LESS copied to clipboard

Certain calc fields not generated correctly

Open JasonBarnabe opened this issue 5 years ago • 2 comments

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));

JasonBarnabe avatar Mar 04 '19 18:03 JasonBarnabe

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.

meze avatar Mar 11 '19 21:03 meze

This is fixed in the community fork Fomantic-UI since 2.5.0 by https://github.com/fomantic/Fomantic-UI/pull/97

lubber-de avatar Dec 19 '21 20:12 lubber-de