Skip to content

Instantly share code, notes, and snippets.

@meltingice
Created June 16, 2011 16:22
Show Gist options
  • Save meltingice/1029618 to your computer and use it in GitHub Desktop.
Save meltingice/1029618 to your computer and use it in GitHub Desktop.
.background-gradient(@start, @stop) {
background-image:-moz-linear-gradient(top, @start, @stop);
background-image:-o-linear-gradient(top, @start, @stop);
background-image:-webkit-gradient(linear, left top, left bottom, from(@start), to(@stop));
background-image:-webkit-linear-gradient(@start, @stop);
background-image:linear-gradient(top, @start, @stop);
filter: ~"progid:DXImageTransform.Microsoft.gradient(startColorStr='@{start}', EndColorStr='@{stop}')";
}
.transition(@element, @duration, @easing) {
-moz-transition: @element @duration @easing;
-webkit-transition: @element @duration @easing;
-o-transition: @element @duration @easing;
-ms-transition: @element @duration @easing;
transition: @element @duration @easing;
}
.border-radius(@topleft, @topright, @bottomright, @bottomleft) {
border-top-left-radius: @topleft;
border-top-right-radius: @topright;
border-bottom-right-radius: @bottomright;
border-bottom-left-radius: @bottomleft;
-webkit-border-top-left-radius: @topleft;
-webkit-border-top-right-radius: @topright;
-webkit-border-bottom-right-radius: @bottomright;
-webkit-border-bottom-left-radius: @bottomleft;
-moz-border-radius: @topleft @topright @bottomright @bottomleft;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
.uniform-border-radius(@radius) {
border-radius: @radius;
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
.box-shadow(@left, @top, @size, @color) {
-moz-box-shadow: @left @top @size @color;
-webkit-box-shadow: @left @top @size @color;
box-shadow: @left @top @size @color;
}
.inset-box-shadow(@left, @top, @size, @color) {
-moz-box-shadow: inset @left @top @size @color;
-webkit-box-shadow: inset @left @top @size @color;
box-shadow: inset @left @top @size @color;
}
.box-rotate(@amt) {
-moz-transform: rotate(@amt);
-o-transform: rotate(@amt);
-webkit-transform: rotate(@amt);
-ms-transform: rotate(@amt);
transform: rotate(@amt);
zoom: 1;
}
.bgsize(@width, @height) {
-moz-background-size: @width @height;
-webkit-background-size: @width @height;
background-size: @width @height;
}
.placeholder-color(@color) {
input::-webkit-input-placeholder { color: @color; }
input:-moz-placeholder { color: @color; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment