madskristensen / WebCompiler

Visual Studio extension for compiling LESS and Sass files
Other
451 stars 172 forks source link

Bootstrap 5.2.1 #490

Open WhiskeyJack65 opened 1 year ago

WhiskeyJack65 commented 1 year ago

Installed product versions

Description

WebCompiler fails to transpile Bootstrap 5.2.1

Steps to recreate

  1. Install WebCompiler 1.14.8
  2. Install boostrap@5.2.1 using libman
  3. import bootstrap.scss into custom.scss
  4. right click custom.scss and select => Web Compliler / Re-compile file
  5. Rebuild .net solution

Current behavior

Compile Errors

Error 0 argument $color of rgba($color, $alpha) must be a color Backtrace Styles/bootstrap/scss/_buttons.scss:21, in function rgba Styles/bootstrap/scss/_buttons.scss:21

The offending line of code in _button.scss is: --#{$prefix}btn-focus-box-shadow: 0 0 0 #{$btn-focus-width} rgba(var(--#{$prefix}btn-focus-shadow-rgb), .5);

If I comment this line out the solution compiles.

Expected behavior

I would expect that Web Compiler would transpile all scss files into a single css file in wwwroot/style directory.

mrdavidhanson commented 1 year ago

Experiencing the same

ericcahoon commented 1 year ago

Experiencing the same

AchimStuy commented 6 months ago

Bootstrap 4 used node-sass, which is deprecated and succeeded by sass in Bootstrap 5. @madskristensen can you please update the packages?

AchimStuy commented 6 months ago

I ended up using one of the alternatives described at https://github.com/Taritsyn/DartSassHost#whos-using-dart-sass-host-for-net