Skip to content

Instantly share code, notes, and snippets.

@jewlofthelotus
Created September 23, 2014 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jewlofthelotus/c1d4071722021db84a25 to your computer and use it in GitHub Desktop.
Save jewlofthelotus/c1d4071722021db84a25 to your computer and use it in GitHub Desktop.
Sass Variables
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
$foo: 10;
$foo: 20; // redeclare to overwrite
$foo: 30 !default; // ONLY set if not already, this is the !default
$bar: 10;
.thing {
$foo: 15; // redeclaring within a selector is local
$bar: 15 !global; // UNLESS you use the !global flag
// padding: $foo $bar;
}
.thang {
// padding: $foo $bar;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment