Questions tagged [dart-sass]
93 questions
1
vote
1 answer
Sass returns "Error: ("primary": #0075dd !important, ...) isn't a valid CSS value." when dynamically creating a new map
Whenever I run sass --watch src/sass:dist/css I got this error from the command line
Error: ("primary": #0075dd !important, "secondary": #6b7a93 !important, "sucess": #1eaf3e !important) isn't a valid CSS value.
$map-theme-colors-rgb:…

careLess
- 83
- 6
1
vote
0 answers
Webpack5 don't compile anymore (dart) SASS files and background image doesn't show
I've tried numerous ways to make a background-image to show but nothing worked and now my Sass files won't compile either.
No error is shown anymore but styles are not in place, just html.
webpack.config:
const path = require('path');
const…

Ada
- 11
- 2
1
vote
1 answer
Angular testing is still requiring node-sass after removal. App works, but tests do not run
I upgraded my application to Angular 12.2.5
Everything went relatively smoothly, and I was able to serve my application after the update.
However when I ran ng test, It errored out with the following:
Error: Cannot find module 'node-sass'
It looks…

Gabriel Rivera
- 29
- 5
1
vote
0 answers
Import multiple files at once (with namespaces) by importing a single file with @use
I have a folder where I store all the variables and functions of the project. Separated by functionality in its own file, with a strong use of namespacing.
Right now, maybe because of lack of knowledge about dart-sass, I am forced to import all…

Bati
- 41
- 6
1
vote
1 answer
How to @forward some rules using both a `with` and a `show` clause?
The SCSS @forward rule supports a couple nice features:
@forward './colors' show $red, $green, $blue; will only forward $red, $green, and $blue from ./colors. All other values that ./colors would otherwise export are ignored.
@forward 'library'…

Jwashton
- 302
- 1
- 11
1
vote
1 answer
How do you install dart-sass in visual studio code
I have been using visual studio code (learning web development) with the Live Sass Compiler to compile my sass files into CSS. This has worked great until now. I have started to use the @use instead of @import, BUT I read that it only works with…

Will
- 1,001
- 1
- 6
- 12
1
vote
2 answers
SASS: Is there a way to add an optional selector?
my idea is to add optionally a CSS-Selector to already existing selector stack inside a mixin.
My wish
@mixin myMixin(mobileSelector:true) {
@if(mobileSelector) {
.foo .mobile:before,
}
.classXY .subclass:before{
color: red;
…

TylerD
- 181
- 1
- 1
- 8
1
vote
1 answer
TypeError: The "original" argument must be of type Function - SASS
I'm trying to use the dart-sass module to compile some SCSS in my React project with Typescript. I installed the module, imported it, and got the error in the title. What could it be? Some type of imports I tried:
import { renderSync } from…

GunterJameda
- 88
- 8
1
vote
0 answers
How to propagate configuration everywhere with dart sass modules (@use, @forward, etc..)?
I'm trying to migrate from libsass (@import) to dart sass modules (@use, @forward).
Honestly, I'm finding it quite difficult, because a lot of mixins and files (modules) i used, depend on general configuration variables.
In libsass it was all…

Luca Reghellin
- 7,426
- 12
- 73
- 118
0
votes
0 answers
How to enable native-like warnings from `dart-sass` in `sass-loader`?
I have this in my webpack.config.js:
...
rules: [
{
test: /\.s[ac]ss$/i,
exclude: '/node_modules/',
use: [
// 'style-loader',
MiniCssExtractPlugin.loader,
{
loader:…

Andrew15_5
- 11
- 4
0
votes
0 answers
SASS not working as expected. I have been importing a mixin from a scss file which should work fine but not working
I have been trying to implement themes in react js using sass.
I have taken reference from the medium article .
even though i have followed everything the final output is not as expected. it is not working.
these are the files I…

nsvot
- 3
- 2
0
votes
0 answers
Bootstrap 5.0.2 breaks when I try to compile using Dart Sass
I'm trying to change the primary color in bootstrap with SCSS. I followed all the steps installing Dart Sass and running it on a custom.scss, but when I try to do
@import "bootstrap" //with absolute path to bootstrap ofc
in custom.scss, it gives me…

Jack 't Jong
- 11
- 2
0
votes
1 answer
Dart-Sass Doesnt get added to my System environment
I tried Installing Dart Sass and adding it to my system environment
However after I added it to the environment and did a restart the cmd doesnt recognize it and I get this message
'--version' is not recognized as an internal or external command,
…

Abo Ali
- 81
- 5
0
votes
1 answer
Background image not compiling into assets folder using propshaft with dartsass-rails in rails 7
Using Rails 7 with Propshaft and dartsass-rails. I've just migrated from sassc-rails to dartsass-rails which drops sprockets as the asset pipeline library
I have a background image declared in CSS with background-image:…

Phil-6
- 552
- 6
- 16
0
votes
0 answers
Adding white space in SASS declaration
I'm trying to produce the following SASS code, using a variable that stores the weight for a variable font:
$normal-font: 335;
:root {
font-weight: $normal-font;
font-variation-settings: "wght" #{$normal-font};
}
The CSS result (using…

Donald Jenkins
- 3,485
- 8
- 33
- 35