divya divya - 1 year ago 104
Sass (Sass) Question

Please Explain scss variables

Can anyone explain about scss and basics, about how to use variables,operators,mixins,and partials?

Answer Source
$color: red; // variable

%button-default { // placeholder (doesn't generate css)
    color: $color;

@mixin button() { // mixin
    @extend %button-default; // get placeholder styles


button {
    @include button() { // call mixin and pass content to it
         font-size: 16px;

a {
    @include button(); // just call mixin


To compile scss use gulp, grunt, webpack etc.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download