// LivingSocial SCSS Mixins // Combination of Thoughtbots Bourbon, LESS Mixins (Preboot) & Less Elements // ----------------------------------------------------------------- // Custom Functions @import "functions/deprecated-webkit-gradient"; @import "functions/modular-scale"; @import "functions/tint-shade"; // CSS3 Mixins @import "css3/animation"; @import "css3/appearance"; @import "css3/background-image"; @import "css3/background-clip"; @import "css3/background-origin"; @import "css3/background-size"; @import "css3/border-image"; @import "css3/border-radius"; @import "css3/box-shadow"; @import "css3/box-sizing"; @import "css3/columns"; @import "css3/flex-box"; @import "css3/font-smoothing"; @import "css3/inline-block"; @import "css3/linear-gradient"; @import "css3/radial-gradient"; @import "css3/transform"; @import "css3/transition"; // Addons & other mixins @import "addons/button"; @import "addons/font-family"; @import "addons/html5-input-types"; @import "addons/non-semantic-helpers"; @import "addons/position"; @import "addons/timing-functions"; // Hacks @import "hacks/ie"; // Webkit-style focus // ------------------ @mixin tab-focus() { // Default outline: thin dotted; // Webkit outline: 5px auto -webkit-focus-ring-color; outline-offset: -2px; } // Center-align a block level element // ---------------------------------- @mixin center-block() { display: block; margin-left: auto; margin-right: auto; } // Sizing shortcuts // ------------------------- @mixin size($height: 5px, $width: 5px) { width: $width; height: $height; } @mixin square($size: 5px) { @include size($size, $size); } // Placeholder text // ------------------------- @mixin placeholder($color: $placeholderText) { :-moz-placeholder { color: $color; } ::-webkit-input-placeholder { color: $color; } } // Site container // ------------------------- @mixin container-fixed() { width: $gridRowWidth; margin-left: auto; margin-right: auto; @include clearfix(); } // User select // For selecting text on the page @mixin user-select($select) { -webkit-user-select: $select; -moz-user-select: $select; -o-user-select: $select; user-select: $select; } // Resize anything @mixin resizable($direction: both) { resize: $direction; // Options: horizontal, vertical, both overflow: auto; // Safari fix } // CSS3 Content Columns @mixin content-columns($columnCount, $columnGap: $gridColumnGutter) { -webkit-column-count: $columnCount; -moz-column-count: $columnCount; column-count: $columnCount; -webkit-column-gap: $columnGap; -moz-column-gap: $columnGap; column-gap: $columnGap; } // Opacity @mixin opacity($opacity: 100) { opacity: $opacity / 100; filter: alpha(opacity=$opacity); } // BACKGROUNDS // -------------------------------------------------- // Add an alphatransparency value to any background or border color (via Elyse Holladay) @mixin translucent-background($color: $white, $alpha: 1) { background-color: hsla(hue($color), saturation($color), lightness($color), $alpha); } @mixin translucent-border($color: $white, $alpha: 1) { border-color: hsla(hue($color), saturation($color), lightness($color), $alpha); @include background-clip(padding-box); }