Skip to content

Instantly share code, notes, and snippets.

@RJustice
Created December 5, 2012 06:46
Show Gist options
  • Save RJustice/4213126 to your computer and use it in GitHub Desktop.
Save RJustice/4213126 to your computer and use it in GitHub Desktop.
LESS:classes
.box-shadow(@x: 0, @y: 1px, @blur: 1px, @color: #000) {
box-shadow: @x @y @blur @color;
-moz-box-shadow: @x @y @blur @color;
-webkit-box-shadow: @x @y @blur @color;
}
.inset-box-shadow(@x: 0, @y: 1px, @blur: 1px, @color: #000) {
box-shadow: inset @x @y @blur @color;
-moz-box-shadow: inset @x @y @blur @color;
-webkit-box-shadow: inset @x @y @blur @color;
}
.text-shadow(@x: 1px, @y: 1px, @blur: 1px, @color: #fff, @opacity: 70) {
text-shadow: @x @y @blur-radius @color;
filter: ~"glow(color=@color,strength=@blur), alpha(opacity=@opacity)"; // IE
}
.border-radius(@radius:6px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
.border-radius-top-right(@radius: 6px) {
-webkit-border-top-right-radius: @radius;
-moz-border-radius-topright: @radius;
border-top-right-radius: @radius;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
.border-radius-top-left(@radius: 6px) {
-webkit-border-top-left-radius: @radius;
-moz-border-radius-topleft: @radius;
border-top-left-radius: @radius;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
.border-radius-bottom-right(@radius: 6px) {
-webkit-border-bottom-right-radius: @radius;
-moz-border-radius-bottomright: @radius;
border-bottom-right-radius: @radius;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
.border-radius-bottom-left(@radius: 6px) {
-webkit-border-bottom-left-radius: @radius;
-moz-border-radius-bottomleft: @radius;
border-bottom-left-radius: @radius;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
.multi-rounded-corners(@topLeft: 5px, @topRight: 5px, @bottomRight: 5px, @bottomLeft: 5px)
{
-webkit-border-radius: @arguments;
-moz-border-radius: @arguments;
border-radius:@arguments;
}
.vertical-gradient(@from: #000, @to: #FFF)
{
background: @from;
background: -webkit-gradient(linear, 0 bottom, 0 top, from(@from), to(@to));
background: -webkit-linear-gradient(@from, @to);
background: -moz-linear-gradient(-90deg, @from 0%, @to 100%);
background: -moz-gradient(center top, @from 0%, @to 100%);
background: linear-gradient(@from, @to);
-pie-background: linear-gradient(@from, @to);
}
.multi-color-border(@top, @sides, @bottom) {
border-top: 1px solid @top;
border-left: 1px solid @sides;
border-right: 1px solid @sides;
border-bottom: 1px solid @bottom;
}
.css3pie() {
behavior: url(PIE.htc);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment