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

semantic.css not generating valid CSS

Open githubbob42 opened this issue 3 years ago • 6 comments

Starting with v1.40.0 of SASS (dart-sass) , sass is now parsing calc() syntax more thoroughly and marking errors if there is already broken CSS.

As you can see in the lines from the dist/semantic.css file, values like --1px are not valid values and seems to come from trying to negate negative values(?). E.g.

@ribbonImageMargin: -0.05rem; /* Rounding Offset on Triangle */
@ribbonImageOffset: calc(-@ribbonImageMargin - @ribbonTriangleSize);

and it's causing our builds to fail:

Creating an optimized production build...
Failed to compile.

./src/App.scss
SassError: Expected digit.
      ╷
14460 │   left: calc(--0.05rem - 1.2em);
      │               ^
  • https://github.com/Semantic-Org/Semantic-UI/blob/deb275d2d5fe9a522a0b7bd8b6b6a1c939552718/dist/semantic.css#L15088

  • https://github.com/Semantic-Org/Semantic-UI/blob/deb275d2d5fe9a522a0b7bd8b6b6a1c939552718/dist/semantic.css#L19852

  • https://github.com/Semantic-Org/Semantic-UI/blob/deb275d2d5fe9a522a0b7bd8b6b6a1c939552718/src/themes/default/elements/step.variables#L98

  • https://github.com/Semantic-Org/Semantic-UI/blob/deb275d2d5fe9a522a0b7bd8b6b6a1c939552718/src/themes/default/elements/label.variables#L139

image

githubbob42 avatar Sep 21 '21 16:09 githubbob42

This is fixed in the community fork Fomantic-UI https://github.com/fomantic/Fomantic-UI/blob/022588e4e6b73c9c45d77f8bc373919c2806553d/src/themes/default/elements/label.variables#L142

lubber-de avatar Sep 22 '21 12:09 lubber-de

+1

bordernone avatar Dec 04 '22 19:12 bordernone

+1

flipmcswiss avatar Dec 08 '22 19:12 flipmcswiss

+1

BryanBerger98 avatar Jan 24 '23 09:01 BryanBerger98

+1 had to remove the -- for it to work

poof86 avatar Feb 21 '23 14:02 poof86

edit package.json and change the sass version to 1.39.0

bordernone avatar Apr 02 '23 20:04 bordernone