Questions tagged [dart-sass]

93 questions
2
votes
1 answer

You are trying to use "scss". node-sass is missing

My project is running node-sass but I decided to change that to sass (dart-sass) because I want to avoid installing python, g++ and make just to run npm install, which node-sass forces you to do because of node-gyp. So I ran $ npm uninstall…
user10706046
2
votes
2 answers

Alternative or better architecture of sass guidelines to build multipage site

In https://sass-guidelin.es/#architecture is adviced like best practice to build an architecture like that for a site, using partials and having only one CSS file named main.css (the only file that won't be a partial, thus the unique .css outputed…
Nick
  • 1,439
  • 2
  • 15
  • 28
1
vote
0 answers

Bootstrap 5.3 - sass compiling doesn't work

I hope you can help me. To compile I use Dart Sass, I get the error: error node_modules/bootstrap/scss/_variables.scss (Line 1107: $color: "var(--bs-success-rgb)" is not a color for `rgba') Does not recognize bootstrap variables. I use the command:…
1
vote
0 answers

How to watch entire directory of scss and compile files separately in their own sub-folders?

I have a css folder with sub-folders populated with scss files. How can I watch the whole folder and automatically generate a separate style.css file on change for every folder. `--css --content content.scss --home home.scss …
user21205571
1
vote
1 answer

My SASS compiler in watch mode doesn't track changes even in the main.scss file

I have a bunch of seperated .scss partials and components, all imported to my main.scss file. Using npm's (ver. 9.2) sass (ver. 1.56) I can compile the entire project no problem with sass ./assets/scss/main.scss ./assets/css/style.css command ran as…
Lurco
  • 199
  • 1
  • 2
  • 12
1
vote
1 answer

Live Sass Compiler is Node Sass or Dart Sass?

I found 2 extension are named Live Sass Compiler. One of them which developed by Ritwick Dey has been deprecated. And it was not compatible Dart Sass (@use or @forward). Another one is…
1
vote
1 answer

Dart-Sass Compilation Issue in React

I'm getting the following error when trying to compile my react project after upgrading some npm packages (getting latest and mainly upgrading carbon). I'v been stuck on this and can't seem to find what's wrong but seems sass failing to compile: The…
ZiggY
  • 111
  • 1
  • 9
1
vote
0 answers

How to call a Dart static method from JavaScript

I used dart-sass to learn and implement a Dart library used in Node.js. Everything works fine (thanks Dart Sass team!). However I would also like to call static methods in Dart classes from JavaScript. I created JsClass.defineStaticMethods() to add…
borut
  • 73
  • 4
1
vote
0 answers

Support for the `darken` function in Dart Sass

In one of the SCSS stylesheets in our project, we import two stylesheets from the WordPress Gutenberg components @import '@gutenberg-components/button/style.scss'; @import '@gutenberg-components/date-time/style.scss'; (@gutenberg-components is an…
And Finally
  • 5,602
  • 14
  • 70
  • 110
1
vote
1 answer

Sass stuck on compiling @extend property inside loop but works with node-sass

following code is using by css-star-rating library. @for $i from $minRatingValue through $maxNumOfStars { &.value-#{$i}.half { .star-container { @if ($i < $maxNumOfStars) { .star:nth-child(#{$i+1}) { @extend…
billyjov
  • 2,778
  • 19
  • 35
1
vote
0 answers

SASS Error: The target selector was not found

I'm getting this error: Error: The target selector was not found. Use "@extend .animate--fade-in !optional" to avoid this error. ╷ 276 │ @extend .animate--fade-in; │ ^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ from the following…
Dmitry Shvedov
  • 3,169
  • 4
  • 39
  • 51
1
vote
0 answers

Loading module with @use in SASS imported file causes SassError: Undefined variable

I have styles.scss file which loads variables from variables.scss and pass them to all imported stylesheets (according to docs) // style.scss @use "variables" as *; @import "test"; // variables.scss $body-color: red; If I use simple _tests.scss…
alexsakhnov
  • 311
  • 2
  • 8
1
vote
1 answer

Sass / Dartsass-rails Error: Can't find style sheet to import / Undefined mixin

Rails 7, dartsass-rails, cssbundling-rails, propshaft, importmaps App structure app/assets/stylesheets/ /components _index.scss ///other flies /global _index.scss _variables.scss ///other flies /layouts _index.scss ///other…
Chrismisballs
  • 167
  • 12
1
vote
0 answers

Problem with migration from lib-sass to dart-sass

We are migrating to dart-sass and have annoying issue with @extend, part from our source code: .error { color: red; } .checkboxWrapper { &.error { .checkboxLabel::before { @extend .error; } } } .checkbox { …
Alexandr Vysotsky
  • 1,081
  • 13
  • 16
1
vote
1 answer

sass-loader gives 'at-rule is not allowed' errors

I'm using webpack@5.58.1 and sass-loader@12.1.0 with dart-sass. My project uses scss-files from node_modules. When I build the project, webpack gives me a bunch of errors looking like SassError: This at-rule is not allowed here. ╷ 64 │ …
stahlhammer
  • 87
  • 1
  • 11