Skip to content

Instantly share code, notes, and snippets.

.rounded{
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
#main {
width: 200px;
height: 200px;
background: @lightgray;
.rounded;
@sadaco
sadaco / gist:2842218
Created May 31, 2012 09:25
border-radius
.rounded(@radius:3px){
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
@sadaco
sadaco / gist:2842222
Created May 31, 2012 09:26
Mixins example
#main {
width: 200px;
height: 200px;
background: @lightgray;
.rounded(20px);
}
@sadaco
sadaco / gist:2842565
Created May 31, 2012 10:39
More Mixins
@lightblue:#a9c6d2;
.cloudstyle(){
content: '';
position: absolute;
background: @lightblue;
z-index: -1
} //every part of the Cloud has this style
#cloud {
@sadaco
sadaco / gist:2842602
Created May 31, 2012 10:46
More Mixins CSS
#cloud {
width: 350px;
height: 120px;
background: #a9c6d2;
border-radius: 100px;
-webkit-border-radius: 100px;
-moz-border-radius: 100px;
position: relative;
margin: 120px auto 20px;
@sadaco
sadaco / gist:2843256
Created May 31, 2012 12:59
Add parameters
@lightblue:#a9c6d2;
.cloudstyle(@bgColour, @border-radius){ // Here we add the parameters
content: '';
position: absolute;
background: @bgColour;
z-index: -1;
.rounded(@border-radius);
} //every part of the Cloud has this style
@sadaco
sadaco / gist:2843264
Created May 31, 2012 13:00
static parameters
.cloudstyle(@bgColour:#292929, @border-radius:100px)
@sadaco
sadaco / gist:2989886
Created June 25, 2012 17:00
Operations
@general-margin: 10px;
.cloud{
margin-top:@general-margin;
}
.cloudmini{
margin-top:@general-margin +10px;
}
@sadaco
sadaco / gist:2989941
Created June 25, 2012 17:11
details about the operators
+,-,*,/ - Arithmetic operators
lighten(@colour, n%) - Returns the colour value @colour, lightened by n percent
darken(@colour, n%) - Returns the colour value @colour, darkened by n percent
saturate(@colour, n%) - Returns the colour value @colour, with saturation increased by n percent
desaturate(@colour, n%) - Returns the colour value @colour, with saturation decreased by n percent
fadein(@colour, n%) - Returns the colour value @colour, made n percent more opaque
fadeout(@colour, n%) - Returns the colour value @colour, made n percent more transparent
hue(@colour) - Returns the hue component of the colour value @colour
saturation(@colour) - Returns the saturation component of the colour value @colour
lightness(@colour) - Returns the lightness component of the colour value @colour
@size: 60px;
h1 { font-size: @size; }
h2 { font-size: @size * .8; }
h3 { font-size: @size * .6; }
h4 { font-size: @size * .4; }
h5 { font-size: @size * .2; }