Last active
December 17, 2015 00:49
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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