Skip to content

Instantly share code, notes, and snippets.

@chrsr
Last active December 17, 2015 09:39
Show Gist options
  • Save chrsr/5589258 to your computer and use it in GitHub Desktop.
Save chrsr/5589258 to your computer and use it in GitHub Desktop.
// http://less2css.org/
/* CSS Comments */
// Vs Silent Comments
/* Importing */
@import 'my-mixins.css';
/* Variables */
@green: #91c43f;
@blue: #0068b3;
body {
background: @green;
}
/* Mixins */
// parametric mixins
.border-radius(@radius) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
.feature {
.border-radius(3px);
}
// mixing in other styles
.generic-feature-style {
color: @green;
}
.feature {
.generic-feature-style;
}
/* Nesting */
.feature {
position: absolute;
.intro-text {
display: inline-block;
}
&:first-child {
margin-top: 10px;
}
}
/* Functions */
@line-height: 10px;
.feature {
line-height: @line-height * 4;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment