Skip to content

Instantly share code, notes, and snippets.

View Granze's full-sized avatar
💫
nothing to see here

Maurizio Mangione Granze

💫
nothing to see here
View GitHub Profile
@Granze
Granze / gist:2200257
Created March 25, 2012 22:01
[LESS] Horizontal gradient
.hGradient (@startColor: #eee, @endColor: #fff) {
background-color: @startColor;
background-image: -webkit-gradient(linear, left top, right top, from(@startColor), to(@endColor));
background-image: -webkit-linear-gradient(left, @startColor, @endColor);
background-image: -moz-linear-gradient(left, @startColor, @endColor);
background-image: -ms-linear-gradient(left, @startColor, @endColor);
background-image: -o-linear-gradient(left, @startColor, @endColor);
}
@Granze
Granze / gist:2200254
Created March 25, 2012 22:00
[LESS] gradient
.gradient (@startColor: #eee, @endColor: #fff) {
background-color: @startColor;
background: -webkit-gradient(linear, left top, left bottom, from(@startColor), to(@endColor));
background: -webkit-linear-gradient(top, @startColor, @endColor);
background: -moz-linear-gradient(top, @startColor, @endColor);
background: -ms-linear-gradient(top, @startColor, @endColor);
background: -o-linear-gradient(top, @startColor, @endColor);
}
@Granze
Granze / text-shadow.less
Created March 25, 2012 21:55
[LESS] Text shadow
.textShadow (@value: 1px 1px 3px rgba(0, 0, 0, .3)) {
text-shadow: @value;
}
@Granze
Granze / box_shadow.less
Created March 21, 2012 22:14
[LESS] Box shadow
.boxShadow(@x : 2px, @y : 2px, @blur : 5px, @spread : 0, @color : rgba(0,0,0,.6)) {
-webkit-box-shadow: @x @y @blur @spread @color;
-moz-box-shadow: @x @y @blur @spread @color;
box-shadow: @x @y @blur @spread @color;
}
@Granze
Granze / Image replacement
Created March 17, 2012 23:18
CSS Image replacement
/* http://nicolasgallagher.com/another-css-image-replacement-technique/ */
.ir {
font: 0/0 a;
text-shadow: none;
color: transparent;
}
@Granze
Granze / microclearfix.less
Created March 15, 2012 20:38
[LESS] A new micro clearfix
/* http://nicolasgallagher.com/micro-clearfix-hack/ */
.cf {
zoom: 1;
&:before, &:after {
content: "";
display: table;
}
&:after {
clear: both;