Skip to content

Instantly share code, notes, and snippets.

@ThorstenHans
Last active August 29, 2015 13:56
Show Gist options
  • Save ThorstenHans/9059838 to your computer and use it in GitHub Desktop.
Save ThorstenHans/9059838 to your computer and use it in GitHub Desktop.
SASS
# install sass on windows
gem install sass
# ensure root permissions on -ix systems using sudo
sudo gem install sass
# check the installation by querying for the current SASS version
sass -v
.panel {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px; }
header {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px; }
footer {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px; }
.advertisement {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-ms-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px; }
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
-o-border-radius: $radius;
border-radius: $radius;
}
.panel { @include border-radius(5px); }
header { @include border-radius(3px); }
footer { @include border-radius(3px); }
.advertisement { @include border-radius(5px); }
article {
font-family: Arial;
font-size: 11px; }
article h1 {
font-weight: bold;
font-size: 150%; }
article .important {
line-height: 1.4em; }
article .important a {
color: red; }
$accentColor: #ff0000;
article {
font-family: Arial;
font-size: 11px;
h1{
font-weight: bold;
font-size: 150%;
}
.important{
line-height: 1.4em;
a{
color: $accentColor;
}
}
}
body {
background-color: #cccccc;
color: #3399cc; }
h1 {
background-color: #3399cc;
color: #cccccc; }
$color: #3399CC;
$otherColor: #CCC;
body{
background-color: $otherColor;
color: $color;
}
h1{
background-color: $color;
color: $otherColor;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment