Created
January 23, 2011 17:38
-
-
Save jayroh/792255 to your computer and use it in GitHub Desktop.
customized html5boilerplate css in the form of an scss partial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// when selecting text, use the following bg and fg colors | |
$selection-background: #8d7c79; | |
$selection-color: #4c3332; | |
html, body, div, span, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
abbr, address, cite, code, | |
del, dfn, em, img, ins, kbd, q, samp, | |
small, strong, sub, sup, var, | |
b, i, | |
dl, dt, dd, ol, ul, li, | |
fieldset, form, label, legend, | |
table, caption, tbody, tfoot, thead, tr, th, td, | |
article, aside, canvas, details, figcaption, figure, | |
footer, header, hgroup, menu, nav, section, summary, | |
time, mark, audio, video { | |
margin:0; | |
padding:0; | |
border:0; | |
outline:0; | |
font-size:100%; | |
vertical-align:baseline; | |
background:transparent; | |
} | |
article, aside, details, figcaption, figure, | |
footer, header, hgroup, menu, nav, section { display:block; } | |
blockquote, q { quotes:none; } | |
blockquote:before, | |
blockquote:after, | |
q:before, | |
q:after { content:''; content:none; } | |
a { margin:0; padding:0; font-size:100%; vertical-align:baseline; background:transparent; } | |
ins { background-color:#ff9; color:#000; text-decoration:none; } | |
mark { background-color:#ff9; color:#000; font-style:italic; font-weight:bold; } | |
del { text-decoration: line-through; } | |
abbr[title], | |
dfn[title] { border-bottom:1px dotted; cursor:help; } | |
hr { display:block; height:1px; border:0; border-top:1px solid #ccc; margin:1em 0; padding:0; } | |
input, | |
select { vertical-align:middle; } | |
// tables still need cellspacing="0" in the markup | |
table { border-collapse:collapse; border-spacing:0; } | |
h1,h2,h3,h4,h5,h6 { font-weight: bold; } | |
// always force a scrollbar in non-IE | |
html { overflow-y: scroll; } | |
a:hover, | |
a:active { outline: none; } | |
ol { list-style-type: decimal; } | |
nav ul { list-style:none; } | |
nav ul, | |
nav li { margin: 0; } | |
strong, | |
th { font-weight: bold; } | |
td, | |
td img { vertical-align: top; } | |
sub { vertical-align: sub; font-size: smaller; } | |
sup { vertical-align: super; font-size: smaller; } | |
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 */ | |
} | |
textarea { overflow: auto; } | |
.ie6 legend, | |
.ie7 legend { margin-left: -7px; } /* thnx ivannikolic! */ | |
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; } | |
label, | |
input[type=button], | |
input[type=submit], | |
button { cursor: pointer; } | |
button, | |
input, | |
select, | |
textarea { margin: 0; } | |
button { width: auto; overflow: visible; } | |
// colors for form validity | |
input:valid, textarea:valid { } | |
input:invalid, textarea:invalid { | |
border-radius: 1px; | |
@include box-shadow(red 0px 0px 5px); | |
} | |
.no-boxshadow input:invalid, | |
.no-boxshadow textarea:invalid { background-color: #f0dddd; } | |
// These selection declarations have to be separate. | |
// No text-shadow: twitter.com/miketaylr/status/12228805301 | |
::-moz-selection { | |
background: $selection-background; | |
color: $selection-color; | |
text-shadow: none; | |
} | |
::selection { | |
background: $selection-background; | |
color: $selection-color; | |
text-shadow: none; | |
} | |
// j.mp/webkit-tap-highlight-color | |
a:link { -webkit-tap-highlight-color: $selection-background; } | |
.ie7 img { -ms-interpolation-mode: bicubic; } | |
// ************************************************* | |
// Non-semantic helper classes | |
// extend the following classes with compass | |
// ************************************************* | |
// example: | |
// header hgroup h1 a { | |
// @extend .ir; | |
// } | |
.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; } /* image replacement */ | |
.hidden { display: none; visibility: hidden; } | |
.visuallyhidden { | |
position: absolute !important; | |
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ | |
clip: rect(1px, 1px, 1px, 1px); | |
} | |
.invisible { visibility: hidden; } | |
// no clearfix class - no need. | |
// ************************************************* | |
// # at the top of your main/base scss file: | |
// @import "compass/utilities/general/clearfix" | |
// ************************************************* | |
// # then inside of your selectors | |
// #main-div-with-floated-children { | |
// ... everything ... | |
// @import clearfix | |
// } | |
// ************************************************* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment