Skip to content

Instantly share code, notes, and snippets.

<link href="styles.less" rel="stylesheet/less" type="text/css" />
<script type="text/javascript" src="http://lesscss.googlecode.com/files/less-1.3.0.min.js"></script>
<div class="container">
<a class="btn red" href="#">Button 1</a>
<a class="btn green" href="#">Button 2</a>
<a class="btn blue" href="#">Button 3</a>
</div>
.border-radius (@radius: 5px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
.btn{
.border-radius(10px);
}
@glynrob
glynrob / gist:5995142
Created July 14, 2013 18:10
Nested Less CSS
a{
color:#000000;
}
a:hover{
color:#CCCCCC;
}
@glynrob
glynrob / gist:5995147
Created July 14, 2013 18:10
Nested LESS CSS
a{
color:#000000;
&:hover{
color:#CCCCCC;
}
}
@glynrob
glynrob / gist:5996282
Created July 14, 2013 21:58
SCSS Variables
$red: #BF3130;
.red{
background-color:$red;
}
.red {
background-color: #bf3130;
}
@glynrob
glynrob / gist:5996316
Created July 14, 2013 22:06
SCSS Mixins
@mixin border-radius ($radius: 5px) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
border-radius: $radius;
}
.btn{
@include border-radius(10px);
}
@glynrob
glynrob / gist:5996319
Created July 14, 2013 22:08
SCSS Nested
a{
color:#000000;
&:hover{
color:#CCCCCC;
}
}
@glynrob
glynrob / gist:6011743
Last active December 19, 2015 20:09
Stylus Basic Example
body
background-color desaturate(blue, 80%) // function desaturate
font-family Arial, Helvetica, sans-serif