Skip to content

Instantly share code, notes, and snippets.

@nerdsrescueme
Created June 8, 2011 16:10
Show Gist options
  • Save nerdsrescueme/1014729 to your computer and use it in GitHub Desktop.
Save nerdsrescueme/1014729 to your computer and use it in GitHub Desktop.
CSS Less Library
@columns: 12;
@column: 60px;
@gutter: 10px;
@page: (@column * @columns) + ((@gutter * @columns) * 2);
.row {
width: @page;
margin: 0 auto;
overflow: hidden;
}
.column (@cols: 1) {
width: (@column * @cols) + ((@gutter * 2) * @cols);
margin: 0 @gutter;
float: left;
display: inline;
}
/* Alias */
.columns (@cols: 1) {
.column(@cols);
}
.alpha {
float: left;
margin-left: 0;
}
.omega {
float: right;
margin-right: 0;
}
/* Clearfix */
.clear {
clear: both;
}
@padding-multiplier: 3px;
@margin-multiplier: 3px;
@sans-serif: "Lucida Grande","Lucida Sans Unicode", Helvetica, Tahoma, sans-serif;
@serif: Georgia, Garamond, Times, serif;
@bg-color-dark: #151516;
@bg-color-light: #ffffff;
@h-color-dark: #fff;
@h-color-light: #fff;
@text-color-light: #fff;
@text-color-dark: #fff;
@link-color-light: #fff;
@link-color-dark: #fff;
@primary-color: #fff;
@secondary-color: #fff;
@tertiary-color: #fff;
/* blocks */
.centered { margin: 0 auto; }
.no-padding { padding: 0; }
.no-margin { margin: 0; }
.uppercase { text-transform: uppercase; }
.bold { font-weight: bold; }
.italic { text-decoration: }
.underline { text-decoration: underline; }
.no-underline { text-decoration: none; }
.shadow (@offset: 1px, @blur: 3px, @color: #888 ) {
-moz-box-shadow: @offset @offset @blur @color;
-webkit-box-shadow: @offset @offset @blur @color;
box-shadow: @offset @offset @blur @color;
}
.rounded(@radius: 3px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment