Created
June 10, 2012 14:39
-
-
Save Mr2P/2905971 to your computer and use it in GitHub Desktop.
Common css classes from Twitter Bootstrap
This file contains hidden or 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
| /* | |
| Reset | |
| Adapted from Normalize.css http://github.com/necolas/normalize.css | |
| ------------------------------------------------------------------------ | |
| Display in IE6-9 and FF3 | |
| ------------------------- | |
| */ | |
| article, | |
| aside, | |
| details, | |
| figcaption, | |
| figure, | |
| footer, | |
| header, | |
| hgroup, | |
| nav, | |
| section { | |
| display: block; | |
| } | |
| /* | |
| Display block in IE6-9 and FF3 | |
| ------------------------- | |
| */ | |
| audio, | |
| canvas, | |
| video { | |
| display: inline-block; | |
| *display: inline; | |
| *zoom: 1; | |
| } | |
| /* | |
| Prevents modern browsers from displaying 'audio' without controls | |
| ------------------------- | |
| */ | |
| audio:not([controls]) { | |
| display: none; | |
| } | |
| /* | |
| Base settings | |
| ------------------------- | |
| */ | |
| html { | |
| font-size: 100%; | |
| -webkit-text-size-adjust: 100%; | |
| -ms-text-size-adjust: 100%; | |
| } | |
| /*Focus states*/ | |
| a:focus { | |
| .tab-focus(); | |
| } | |
| /*Hover & Active*/ | |
| a:hover, | |
| a:active { | |
| outline: 0; | |
| } | |
| /* | |
| Prevents sub and sup affecting line-height in all browsers | |
| ------------------------- | |
| */ | |
| sub, | |
| sup { | |
| position: relative; | |
| font-size: 75%; | |
| line-height: 0; | |
| vertical-align: baseline; | |
| } | |
| sup { | |
| top: -0.5em; | |
| } | |
| sub { | |
| bottom: -0.25em; | |
| } | |
| /* | |
| Img border in a's and image quality | |
| ------------------------- | |
| */ | |
| img { | |
| max-width: 100%; /*Make images inherently responsive*/ | |
| vertical-align: middle; | |
| border: 0; | |
| -ms-interpolation-mode: bicubic; | |
| } | |
| /*Prevent max-width from affecting Google Maps*/ | |
| #map_canvas img { | |
| max-width: none; | |
| } | |
| /* | |
| Forms | |
| ------------------------- | |
| Font size in all browsers, margin changes, misc consistency | |
| */ | |
| button, | |
| input, | |
| select, | |
| textarea { | |
| margin: 0; | |
| font-size: 100%; | |
| vertical-align: middle; | |
| } | |
| button, | |
| input { | |
| *overflow: visible; /*Inner spacing ie IE6/7*/ | |
| line-height: normal; /*FF3/4 have !important on line-height in UA stylesheet*/ | |
| } | |
| button::-moz-focus-inner, | |
| input::-moz-focus-inner { /*Inner padding and border oddities in FF3/4*/ | |
| padding: 0; | |
| border: 0; | |
| } | |
| button, | |
| input[type="button"], | |
| input[type="reset"], | |
| input[type="submit"] { | |
| cursor: pointer; /*Cursors on all buttons applied consistently*/ | |
| -webkit-appearance: button; /*Style clickable inputs in iOS*/ | |
| } | |
| input[type="search"] { /*Appearance in Safari/Chrome*/ | |
| -webkit-box-sizing: content-box; | |
| -moz-box-sizing: content-box; | |
| box-sizing: content-box; | |
| -webkit-appearance: textfield; | |
| } | |
| input[type="search"]::-webkit-search-decoration, | |
| input[type="search"]::-webkit-search-cancel-button { | |
| -webkit-appearance: none; /*Inner-padding issues in Chrome OSX, Safari 5*/ | |
| } | |
| textarea { | |
| overflow: auto; /*Remove vertical scrollbar in IE6-9*/ | |
| vertical-align: top; /*Readability and alignment cross-browser*/ | |
| } | |
| /* | |
| UTILITY CLASSES | |
| --------------- | |
| Quick floats | |
| */ | |
| .pull-right { | |
| float: right; | |
| } | |
| .pull-left { | |
| float: left; | |
| } | |
| /*Toggling content*/ | |
| .hide { | |
| display: none; | |
| } | |
| .show { | |
| display: block; | |
| } | |
| /*Visibility*/ | |
| .invisible { | |
| visibility: hidden; | |
| } | |
| /* | |
| Hide from screenreaders and browsers | |
| Credit: HTML5 Boilerplate | |
| */ | |
| .hidden { | |
| display: none; | |
| visibility: hidden; | |
| } | |
| /* | |
| CSS image replacement | |
| ------------------------- | |
| Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 | |
| */ | |
| .hide-text { | |
| font: 0/0 a; | |
| color: transparent; | |
| text-shadow: none; | |
| background-color: transparent; | |
| border: 0; | |
| } | |
| /* | |
| Clearfix | |
| -------- | |
| For clearing floats like a boss h5bp.com/q | |
| */ | |
| .clearfix { | |
| *zoom: 1; | |
| } | |
| .clearfix:before, | |
| .clearfix:after { | |
| display: table; | |
| content: ""; | |
| } | |
| .clearfix:after { | |
| clear: both; | |
| } | |
| /* | |
| Text overflow | |
| ------------------------- | |
| Requires inline-block or block for proper styling | |
| */ | |
| .text-overflow { | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| white-space: nowrap; | |
| } | |
| /*Block level inputs*/ | |
| .input-block-level { | |
| display: block; | |
| width: 100%; | |
| min-height: 28px; /*Make inputs at least the height of their button counterpart*/ | |
| /*Makes inputs behave like true block-level elements*/ | |
| -webkit-box-sizing: border-box; | |
| -moz-box-sizing: border-box; | |
| -ms-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } | |
| /* | |
| Layouts | |
| Fixed-width and fluid (with sidebar) layouts | |
| -------------------------------------------- | |
| */ | |
| /*Container (centered, fixed-width layouts)*/ | |
| .container { | |
| margin-right: auto; | |
| margin-left: auto; | |
| *zoom: 1; | |
| } | |
| .container:before, | |
| .container:after { | |
| display: table; | |
| content: ""; | |
| } | |
| .container:after { | |
| clear: both; | |
| } | |
| /*Fluid layouts (left aligned, with sidebar, min- & max-width content)*/ | |
| .container-fluid { | |
| padding-right: 20px; | |
| padding-left: 20px; | |
| *zoom: 1; | |
| } | |
| .container-fluid:before, | |
| .container-fluid:after { | |
| display: table; | |
| content: ""; | |
| } | |
| .container-fluid:after { | |
| clear: both; | |
| } | |
| .row { | |
| margin-left: -20px; | |
| *zoom: 1; | |
| } | |
| .row:before, | |
| .row:after { | |
| display: table; | |
| content: ""; | |
| } | |
| .row:after { | |
| clear: both; | |
| } | |
| [class*="span"] { | |
| float: left; | |
| margin-left: 20px; | |
| } | |
| .container { | |
| width: 940px; | |
| } | |
| .span12 { | |
| width: 940px; | |
| } | |
| .span11 { | |
| width: 860px; | |
| } | |
| .span10 { | |
| width: 780px; | |
| } | |
| .span9 { | |
| width: 700px; | |
| } | |
| .span8 { | |
| width: 620px; | |
| } | |
| .span7 { | |
| width: 540px; | |
| } | |
| .span6 { | |
| width: 460px; | |
| } | |
| .span5 { | |
| width: 380px; | |
| } | |
| .span4 { | |
| width: 300px; | |
| } | |
| .span3 { | |
| width: 220px; | |
| } | |
| .span2 { | |
| width: 140px; | |
| } | |
| .span1 { | |
| width: 60px; | |
| } | |
| .offset12 { | |
| margin-left: 980px; | |
| } | |
| .offset11 { | |
| margin-left: 900px; | |
| } | |
| .offset10 { | |
| margin-left: 820px; | |
| } | |
| .offset9 { | |
| margin-left: 740px; | |
| } | |
| .offset8 { | |
| margin-left: 660px; | |
| } | |
| .offset7 { | |
| margin-left: 580px; | |
| } | |
| .offset6 { | |
| margin-left: 500px; | |
| } | |
| .offset5 { | |
| margin-left: 420px; | |
| } | |
| .offset4 { | |
| margin-left: 340px; | |
| } | |
| .offset3 { | |
| margin-left: 260px; | |
| } | |
| .offset2 { | |
| margin-left: 180px; | |
| } | |
| .offset1 { | |
| margin-left: 100px; | |
| } | |
| .row-fluid { | |
| width: 100%; | |
| *zoom: 1; | |
| } | |
| .row-fluid:before, | |
| .row-fluid:after { | |
| display: table; | |
| content: ""; | |
| } | |
| .row-fluid:after { | |
| clear: both; | |
| } | |
| .row-fluid [class*="span"] { | |
| display: block; | |
| float: left; | |
| width: 100%; | |
| min-height: 28px; | |
| margin-left: 2.127659574%; | |
| *margin-left: 2.0744680846382977%; | |
| -webkit-box-sizing: border-box; | |
| -moz-box-sizing: border-box; | |
| -ms-box-sizing: border-box; | |
| box-sizing: border-box; | |
| } | |
| .row-fluid [class*="span"]:first-child { | |
| margin-left: 0; | |
| } | |
| .row-fluid .span12 { | |
| width: 99.99999998999999%; | |
| *width: 99.94680850063828%; | |
| } | |
| .row-fluid .span11 { | |
| width: 91.489361693%; | |
| *width: 91.4361702036383%; | |
| } | |
| .row-fluid .span10 { | |
| width: 82.97872339599999%; | |
| *width: 82.92553190663828%; | |
| } | |
| .row-fluid .span9 { | |
| width: 74.468085099%; | |
| *width: 74.4148936096383%; | |
| } | |
| .row-fluid .span8 { | |
| width: 65.95744680199999%; | |
| *width: 65.90425531263828%; | |
| } | |
| .row-fluid .span7 { | |
| width: 57.446808505%; | |
| *width: 57.3936170156383%; | |
| } | |
| .row-fluid .span6 { | |
| width: 48.93617020799999%; | |
| *width: 48.88297871863829%; | |
| } | |
| .row-fluid .span5 { | |
| width: 40.425531911%; | |
| *width: 40.3723404216383%; | |
| } | |
| .row-fluid .span4 { | |
| width: 31.914893614%; | |
| *width: 31.8617021246383%; | |
| } | |
| .row-fluid .span3 { | |
| width: 23.404255317%; | |
| *width: 23.3510638276383%; | |
| } | |
| .row-fluid .span2 { | |
| width: 14.89361702%; | |
| *width: 14.8404255306383%; | |
| } | |
| .row-fluid .span1 { | |
| width: 6.382978723%; | |
| *width: 6.329787233638298%; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment