Last active
December 25, 2015 13:19
-
-
Save jpetto/6982713 to your computer and use it in GitHub Desktop.
Sample LESS file
This file contains hidden or 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
// you can use single line comments in LESS! | |
// they will be removed from the generated .less file | |
// variables | |
@text-color: #222223; | |
@light-blue: #a7eaf6; | |
@dark-blue: #2c81d9; | |
@content-padding: 2rem; | |
// mixin for rounded corners | |
.rounded(@radius: 6px) { | |
border-radius: @radius; | |
} | |
// mixin for transition | |
// @delay defaults to 0s if not specified | |
.transition(@prop; @dur; @ease; @delay: 0s) { | |
-webkit-transition: @prop @dur @ease @delay; | |
transition: @prop @dur @ease @delay; | |
} | |
body { | |
background: @dark-blue; | |
} | |
a { | |
color: @dark-blue; | |
// note that the last parameter does not need a trailing semicolon (but it wont hurt if it is there) | |
.transition(all; 0.3s; ease); | |
} | |
.wrapper { | |
padding: @content-padding; | |
color: @text-color; | |
} | |
.article { | |
padding: @content-padding; | |
// what will the border-radius value be here? | |
.rounded; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment