Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap SASS compiled with get-function inside CSS #478

Open
djwia opened this issue Aug 22, 2021 · 6 comments
Open

Bootstrap SASS compiled with get-function inside CSS #478

djwia opened this issue Aug 22, 2021 · 6 comments

Comments

@djwia
Copy link

djwia commented Aug 22, 2021

Installed product versions

  • Visual Studio: Community 2019
  • This extension: [example 1.1.21]

Description

This compiler cannot seem to compile Bootstrap SASS into css by leaving the get-function in the compiled CSS. See below:

.bg-light {
--bs-bg-opacity: 1;
background-color: get-function(rgba-css-var)("light", "bg") !important; }

custom.scss has the following content:

@import "../lib/bootstrap/scss/bootstrap.scss";

Please let me know why this isn't working. I'm using the latest version of VS.

Steps to recreate

  1. Install Web Compiler
  2. Install Bootstrap
  3. Create custom.scss
  4. Add full bootstrap to custom.scss
  5. Automatic compilation

Current behavior

get-function is generated inside the CSS and the CSS fails when viewing the website

I think it is leaving the get-function inside the CSS by not compiling it to an actual CSS code

Expected behavior

get-function should not be inside CSS file.

@FROMCITRUS
Copy link

I worked around the issue temporarily by installing Mads' "Sass Complier" extension. That extension properly parses the file. I believe the reason why this fails is that this extension is using an outdated SASS compiler that predates get-function(). It looks like this extension hasn't gotten an official update in years as well, so it's probably best to just switch over to the other extension or to create a task in VS that runs the newest SASS compiler on build/save.

@djwia
Copy link
Author

djwia commented Aug 24, 2021

Thanks for your reply. It would be good to update this extension. This extension is useful and powerful.

@Giovanni-Mattucci
Copy link

What version of Bootstrap are you using?

@djwia
Copy link
Author

djwia commented Oct 7, 2021

Bootstrap 5

@ivanstus
Copy link

ivanstus commented Oct 7, 2021

Sass compiler works fine with Bootstrap versions before 5.1.0

@markadrake
Copy link

There are a number of issues reported that relate to the specific library (libsass) and the version being outdated.

Now I understand not messing with the defaults, but it would be great if we could expose configuration so the library can be swapped with dart, and a specific version could be requested.

Does anyone know if @madskristensen would approve and release such an update if we were able to create a PR?

I ask because I've also read that there's no intention of updating this - especially for 2022 - to the point that another use has already forked and published a version of web compiler for the new 2022 VS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants