Skip to main content

Questions tagged [sass]

Sass (Syntactically Awesome Style Sheets) is an extension of CSS adding features like nested rules, variables, mixins and class extensions. This enables developers to write structured, manageable and reusable CSS. Sass is compiled into standard CSS. It is primarily a CSS pre-processor language that accepts both the CSS and its personalised syntax of writing visual design codes.

sass
2488 votes
16 answers
1.1m views

What's the difference between SCSS and Sass?

From what I've been reading, Sass is a language that makes CSS more powerful with variable and math support. What's the difference with SCSS? Is it supposed to be the same language? Similar? ...
bbonamin's user avatar
  • 30.5k
1853 votes
6 answers
703k views

Sass Variable in CSS calc() function

I'm trying to use the calc() function in a Sass stylesheet, but I'm having some issues. Here's my code: $body_padding: 50px body padding-top: $body_padding height: calc(100% - $body_padding) ...
GJK's user avatar
  • 37.3k
898 votes
44 answers
1.1m views

How to fix "ReferenceError: primordials is not defined" in Node.js

I have installed Node.js modules by 'npm install', and then I tried to do gulp sass-watch in a command prompt. After that, I got the below response. [18:18:32] Requiring external module babel-register ...
Ramesh's user avatar
  • 9,141
655 votes
23 answers
494k views

Error: 'node-sass' version 5.0.0 is incompatible with ^4.0.0

I've created a blank React project, using the command: npx create-react-app on npm v7.0.7 and Node.js v15.0.1 Installed: React v17.0.1, node-sass v5.0.0, Then I tried to import a blank .scss file to ...
JDKot's user avatar
  • 6,713
598 votes
15 answers
464k views

Import regular CSS file in SCSS file?

Is there anyway to import a regular CSS file with Sass's @import command? While I'm not using all of the SCSS syntax from sass, I do still enjoy it's combining/compressing features, and would like to ...
GSto's user avatar
  • 42.1k
501 votes
2 answers
450k views

Sass Nesting for :hover does not work [duplicate]

I've written this code, but it does not work. What is my problem? .class { margin:20px; :hover { color:yellow; } }
Beach Boys's user avatar
  • 5,149
481 votes
6 answers
514k views

Sass .scss: Nesting and multiple classes?

I'm using Sass (.scss) for my current project. Following example: HTML <div class="container desc"> <div class="hello"> Hello World </div> </div> SCSS ....
matt's user avatar
  • 43.8k
436 votes
6 answers
402k views

Including another class in SCSS

I have this in my SCSS file: .class-a{ display: inline-block; //some other properties &:hover{ color: darken(#FFFFFF, 10%); } } .class-b{ //Inherite class-a here //some ...
F21's user avatar
  • 33k
366 votes
18 answers
236k views

Angular CLI SASS options

I'm new to Angular and I'm coming from the Ember community. Trying to use the new Angular-CLI based on Ember-CLI. I need to know the best way to handle SASS in a new Angular project. I tried using the ...
JDillon522's user avatar
  • 19.5k
356 votes
9 answers
348k views

SASS - use variables across multiple files

I would like to keep one central .scss file that stores all SASS variable definitions for a project. // _master.scss $accent: #6D87A7; $error: #811702; $warning: #F9E055; $valid: #038144;...
dthree's user avatar
  • 20.6k
354 votes
13 answers
191k views

Using fonts with Rails asset pipeline

I have some fonts being configured in my Scss file like so: @font-face { font-family: 'Icomoon'; src: asset-url('icoMoon.eot?#iefix', font) format('embedded-opentype'), asset-url('icoMoon....
rctneil's user avatar
  • 7,136
301 votes
5 answers
187k views

sass --watch with automatic minify?

Is there a way to run: sass --watch a.scss:a.css but have a.css end up being minified? How would I avoid having to run a separate minification step as I compile my stylesheet?
tester's user avatar
  • 22.9k
274 votes
7 answers
240k views

Sass - Converting Hex to RGBa for background opacity

I have the following Sass mixin, which is a half complete modification of an RGBa example: @mixin background-opacity($color, $opacity: .3) { background: rgb(200, 54, 54); /* The Fallback */ ...
Rick Donohoe's user avatar
  • 7,181
271 votes
7 answers
107k views

Why put in front of the file name "_" or "_" in scss/css?

Why put _ in front of the filename in scss? _filename.scss - Why does it need _ ?
Niko_D's user avatar
  • 2,917
269 votes
17 answers
181k views

Try reinstalling `node-sass` on node 0.12?

I would like to use google web starter kit. I installed node.js v0.12.0, node-sass & gulp. And then ran: $ sudo npm install When I typed gulp serve then got this error: Using gulpfile ~/web-...
Takagi Akihiro's user avatar

15 30 50 per page
1
2 3 4 5
1842