Skip to content

Instantly share code, notes, and snippets.

@Dare-NZ
Last active December 17, 2015 00:49
Show Gist options
  • Save Dare-NZ/5523543 to your computer and use it in GitHub Desktop.
Save Dare-NZ/5523543 to your computer and use it in GitHub Desktop.
Some of my most used CSS3 LESS styles, with a bonus @font-face simplifying function
.border-radius(@radius: 3px) {
border-radius: @radius;
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
}
.text-shadow(@color: #fff) {
text-shadow: 1px 1px 1px @color;
filter: dropshadow(color=@color, offx=1, offy=1);
}
.transition(@property: all,@duration: 0.2, @function: ease-in-out) {
-webkit-transition: @property @duration @function;
-moz-transition: @property @duration @function;
-ms-transition: @property @duration @function;
-o-transition: @property @duration @function;
transition: @property @duration @function;
}
.font-face(@font-name: arial) {
@font-face {
font-family: '@{font-name}';
src: url('../fnt/@{font-name}.eot?') format('eot'),
url('../fnt/@{font-name}.woff') format('woff'),
url('../fnt/@{font-name}.ttf') format('truetype');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment