$font-color: #444 !default; //looks better than black: twitter.com/H_FJ/statuses/11800719859 $link-color: #607890 !default; $link-hover-color: #036 !default; $link-active-color: #607890 !default; $link-visited-color: #607890 !default; $selected-font-color: #fff !default; $selected-background-color: #FF5E99 !default; $selected-background-color: #FF5E99 !default; $valid-input-background-color: #ddf0dd !default; $invalid-input-background-color: #f0dddd !default; // // minimal base styles // @mixin html5-boilerplate-page { body, select, input, textarea { color: $font-color; } h1, h2, h3, h4, h5, h6 { @include bold-font; } html { @include font-smoothing; @include force-scrollbar; } a, a:active, a:visited { color: $link-color; } a:hover { color: $link-hover-color; } ul, ol { margin-left: 1.8em; } ol { list-style-type: decimal; } small { @include small-font; } strong, th { @include bold-font; } td, td img { vertical-align: top; } sub { vertical-align: sub; font-size: smaller; } sup { vertical-align: super; font-size: smaller; } @include accessible-focus; @include quoted-pre; @include align-input-labels; @include hand-cursor-inputs; @include input-validation; @include selected-text; @include webkit-tap-highlight; @include ie-hacks; } // maxvoltar.com/archive/-webkit-font-smoothing @mixin font-smoothing { -webkit-font-smoothing: antialiased; } // Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test @mixin accessible-focus { a:hover, a:active { outline: none; } } @mixin small-font { font-size: 85%; } @mixin bold-font { font-weight: bold; } // www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ @mixin quoted-pre { pre { padding: 15px; white-space: pre; // CSS2 white-space: pre-wrap; // CSS 2.1 white-space: pre-line; // CSS 3 (and 2.1 as well, actually) word-wrap: break-word; // IE } } // align checkboxes, radios, text inputs with their label // by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css @mixin align-input-labels { input[type="radio"] { vertical-align: text-bottom; } input[type="checkbox"] { vertical-align: bottom; } .ie7 input[type="checkbox"] { vertical-align: baseline; } .ie6 input { vertical-align: text-bottom; } } // hand cursor on clickable input elements @mixin hand-cursor-inputs { label, input[type=button], input[type=submit], button { cursor: pointer; } } // colors for form validity @mixin input-validation { input:invalid { background-color: $invalid-input-background-color; } input:valid { background-color: $valid-input-background-color; } } // These selection declarations have to be separate. // No text-shadow: twitter.com/miketaylr/status/12228805301 // Also: hot pink. @mixin selected-text { ::-moz-selection{ background:$selected-background-color; color: $selected-font-color; text-shadow: none; } ::selection { background: $selected-background-color; color: $selected-font-color; text-shadow: none; } } // j.mp/webkit-tap-highlight-color @mixin webkit-tap-highlight { a:link { -webkit-tap-highlight-color: $selected-background-color; } } // always force a scrollbar in non-IE @mixin force-scrollbar { overflow-y: scroll; } @mixin ie-hacks { // make buttons play nice in IE: // www.viget.com/inspire/styling-the-button-element-in-internet-explorer/ button { width: auto; overflow: visible; } // bicubic resizing for non-native sized IMG: // code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ .ie7 img { -ms-interpolation-mode: bicubic; } }