// -----------------------------------------------------------------
-// Clearfix for clearing floats like a boss h5bp.com/q
+// UTILITY MIXINS
+// --------------------------------------------------
+
+// Clearfix
+// -------------------------
+// For clearing floats like a boss h5bp.com/q
.clearfix() {
zoom: 1;
&:before,
}
// Center-align a block level element
+// -------------------------
.center-block() {
display: block;
margin-left: auto;
}
// IE7 inline-block
+// -------------------------
.ie7-inline-block() {
*display: inline; /* IE7 inline-block hack */
*zoom: 1;
}
// Sizing shortcuts
+// -------------------------
.size(@height: 5px, @width: 5px) {
width: @width;
height: @height;
.size(@size, @size);
}
-// Input placeholder text
-.placeholder(@color: @grayLight) {
+// Placeholder text
+// -------------------------
+.placeholder(@color: @placeHolderText) {
:-moz-placeholder {
color: @color;
}
}
}
-// Font Stacks
+
+
+// FONTS
+// --------------------------------------------------
+
#font {
#family {
.serif() {
}
}
-// Grid System
+
+
+// GRID SYSTEM
+// --------------------------------------------------
+
+// Site container
+// -------------------------
.fixed-container() {
width: @siteWidth;
margin-left: auto;
margin-right: auto;
.clearfix();
}
+
+// Columns and offseting
+// -------------------------
.columns(@columns: 1) {
width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
}
.offset(@columns: 1) {
margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2);
}
-
// Necessary grid styles for every column to make them appear next to each other horizontally
.gridColumn() {
float: left;
.columns(@columnSpan);
}
+
+
+// CSS3 PROPERTIES
+// --------------------------------------------------
+
// Border Radius
.border-radius(@radius: 5px) {
-webkit-border-radius: @radius;
transform: translate(@x, @y);
}
-// User select
-// For selecting text on the page
-.user-select(@select) {
- -webkit-user-select: @select;
- -moz-user-select: @select;
- -o-user-select: @select;
- user-select: @select;
-}
-
// Background clipping
// Heads up: FF 3.6 and under need padding instead of padding-box
.background-clip(@clip) {
background-clip: @clip;
}
+// Background sizing
+.background-size(@size){
+ -webkit-background-size: @size;
+ -moz-background-size: @size;
+ -o-background-size: @size;
+ background-size: @size;
+}
+
+
// Box sizing
.box-sizing(@boxmodel) {
-webkit-box-sizing: @boxmodel;
box-sizing: @boxmodel;
}
+// User select
+// For selecting text on the page
+.user-select(@select) {
+ -webkit-user-select: @select;
+ -moz-user-select: @select;
+ -o-user-select: @select;
+ user-select: @select;
+}
+
// Resize anything
.resizable(@direction: both) {
resize: @direction; // Options: horizontal, vertical, both
column-gap: @columnGap;
}
+// Opacity
+.opacity(@opacity: 100) {
+ filter: e(%("alpha(opacity=%d)", @opacity));
+ -moz-opacity: @opacity / 100;
+ opacity: @opacity / 100;
+}
+
+
+
+// BACKGROUNDS
+// --------------------------------------------------
+
// Add an alphatransparency value to any background or border color (via Elyse Holladay)
#translucent {
.background(@color: @white, @alpha: 1) {
filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
}
-// Opacity
-.opacity(@opacity: 100) {
- filter: e(%("alpha(opacity=%d)", @opacity));
- -moz-opacity: @opacity / 100;
- opacity: @opacity / 100;
-}
-// Popover arrows
+
+// COMPONENT MIXINS
+// --------------------------------------------------
+
+// POPOVER ARROWS
+// -------------------------
// For tipsies and popovers
#popoverArrow {
.top(@arrowWidth: 5px) {
border-right: @arrowWidth solid @black;
}
}
-
-.background-size(@width, @height){
- -webkit-background-size: @width @height;
- -moz-background-size: @width @height;
- -o-background-size: @width @height;
- background-size: @width @height;
-}