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.
2,007
questions
121
votes
7
answers
121k
views
Creating or referencing variables dynamically in Sass
I'm trying to use string interpolation on my variable to reference another variable:
// Set up variable and mixin
$foo-baz: 20px;
@mixin do-this($bar) {
width: $foo-#{$bar};
}
// Use mixin by ...
73
votes
4
answers
76k
views
False positive "undefined variable" error when compiling SCSS
Getting an error message when compiling my SCSS using the ruby compass gem.
run: /var/lib/gems/1.8/gems/compass-0.12.2/bin/compass compile
out: unchanged sass/partial/grid.scss
out: error sass/...
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 ...
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? ...
24
votes
2
answers
9k
views
Adding a unit to a number in Sass
I am trying to create dynamic values, but have failed so far. The created pixel value seems to lose the ability to be used in calculations.
$numericValue: 30;
$pixelValue: $numericValue+px;
// also ...
194
votes
9
answers
229k
views
How do I use /deep/ or >>> or ::v-deep in Vue.js?
So, I've read here that in Vue.js, you can use /deep/ or >>> in a selector in order to create style rules that apply to elements inside of child components. However, attempting to use this in ...
32
votes
5
answers
55k
views
How to extend/modify (customize) Bootstrap with SASS
I want to create a website theme based on Bootstrap. I want to extend Bootstrap's default components and change some of them. For this, I would need access to SASS variables that Bootstrap defines so ...
168
votes
9
answers
150k
views
Using Sass Variables with CSS3 Media Queries
I'm trying to combine the use of a Sass variable with @media queries as follows:
$base_width:1160px;
@media screen and (max-width: 1170px) {$base_width: 960px;}
@media screen and (min-width: 1171px) ...
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....
17
votes
1
answer
5k
views
Append the parent selector to the end with Sass
Ok, suppose I have the following traditional CSS
.social-media { /* ... */ }
.social-media .twitter { /* ... */ }
.social-media .facebook { /* ... */ }
ul.social-media { /* ... */ }
So, I tried to ...
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
...
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
....
44
votes
4
answers
26k
views
Sass - Manipulate inherited property?
Is it possible, in Sass, to manipulate a value a given element already inherits?
I am aiming for something like this:
body
color: blue
.warning
color: red
strong
color: darken(inherit,20)
68
votes
4
answers
74k
views
How to create color shades using CSS variables similar to darken() of Sass?
I'm looking a way of modifying a CSS variable as you would in SCSS
Define a color like primary - and automatically I would get shades for focus and actives states.
Basically, would like to change ...
238
votes
34
answers
229k
views
Node Sass does not yet support your current environment: Linux 64-bit with false
Getting this error on Arch Linux with node-sass. I'm using it with gulp-sass.
Node Sass does not yet support your current environment: Linux 64-bit with false
Versions
$ gulp -v
[19:43:15] CLI ...