Skip to content

Instantly share code, notes, and snippets.

@saltcod
Created September 21, 2012 11:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saltcod/3761074 to your computer and use it in GitHub Desktop.
Save saltcod/3761074 to your computer and use it in GitHub Desktop.
Intro to less
// global colour variables:
@blue = #3CF;
@red = #DF1F45
#content {
background: #eee;
padding: 25px;
h2 {
color: @blue
border-bottom: 1px solid lighten(@blue, 5%);
&:hover {
color: darken(@blue, 5%);
border-bottom: 1px solid darken(@blue, 10%);
}
}
a {
border-bottom: 1px solid #444;
&:hover {
border-bottom: 1px solid @red;
}
}
}
Instead of:
#content {
background: #eee;
padding: 25px;
}
#content h2 {
color: #3CF;
border-bottom: 1px solid #1F7E91;
}
#content h2:hover {
color: #5CFfee;
border-bottom: 1px solid #4F2E91;
}
#content a {
border-bottom: 1px solid #444;
}
#content a:hover {
border-bottom: 1px solid red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment