Skip to content

Instantly share code, notes, and snippets.

@LeeRJohnson
Created July 15, 2010 21:05
Show Gist options
  • Save LeeRJohnson/477533 to your computer and use it in GitHub Desktop.
Save LeeRJohnson/477533 to your computer and use it in GitHub Desktop.
TYPOGRIDPHY - TYPOGRAPHICAL AND GRID LAYOUT CSS FRAMEWORK FROM HARRY ROBERTS OF CSS WIZARDRY
/*
+----------------------------------------------------------------------------------------------------+
| |
| TYPOGRIDPHY - TYPOGRAPHICAL AND GRID LAYOUT CSS FRAMEWORK FROM HARRY ROBERTS OF CSS WIZARDRY |
| |
+-------------------------------------------------+--------------------------------------------------+
| | |
| TYPOGRIDPHY IS © COPYRIGHT OF HARRY ROBERTS | v 0.2.0 |
| IT IS FREE TO BE USED AND MODIFIED PROVIDED | May 2009 |
| THIS TEXT REMAINS INTACT -- CSSWIZARDRY.COM | http://csswizardry.com/ |
| | |
+-------------------------------------------------+--------------------------------------------------+
TABLE OF CONTENTS
==DEV NOTES
==RESET
==MAIN
==GRIDS
==NAV
==TYPE
=HEADINGS
=PARAGRAPHS
=ELEMENTS
=LINKS
=LISTS
=FIGURES AND MARGINALIA
=OTHER
==FORMS
==IMAGES
==TABLES
==MISC
-------------------------------------------------------- */
/*
==DEV NOTES
+ 'Column' refers to a horizontal with of 60px defined by the 960GS
+ overflow:hidden; is usually applied to clear floats to wrapper elements
+ legend.hide has to have display:none; so that it gets properly hidden
*/
/*
==RESET
---------------------------------------------------------------------------------------------------------------- */
/*YAHOO! RESET http://developer.yahoo.com/yui/reset/*/
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
table {
border-collapse:collapse;
border-spacing:0;
}
fieldset,img {
border:0;
}
address,caption,cite,code,em,strong,dfn,th,var {
font-style:normal;
font-weight:normal;
}
ol,ul {
list-style:none;
}
caption,th {
text-align:left;
}
h1,h2,h3,h4,h5,h6 {
font-size:100%;
font-weight:normal;
}
q:before,q:after {
content:'';
}
abbr,acronym {
border:0;
}
/*---------- END RESET ----------*/
/*
==MAIN
---------------------------------------------------------------------------------------------------------------- */
html{
font-size:100%;
}
body{
font-size:62.5%;
font-family:Georgia, "Times New Roman", Times, serif;
color:#333;
background:url(../images/grid.gif) top center repeat-y #fff;
}
#wrapper{
width:94em;
padding:3em 1em 0 1em;
margin:0 auto;
overflow:hidden;
}
#header{
width:100%;
overflow:hidden;
}
#content{
margin-right:8em;
}
/*
==GRIDS
---------------------------------------------------------------------------------------------------------------- */
/* Set styles common among all grids - all grid divs must be assigned this class */
.generic{
float:left;
margin-right:2em;
}
/* Sets styles for any 'start' grids - this class MUST be given to a grid that is the first in a horizontal series */
.clear{
clear:both;
}
/* Sets styles for any 'end' grids - this class MUST be given to a grid that is the last in a horizontal series */
.end{
margin-left:0!important;
margin-right:0!important;
}
/* 220px */
.onesixty{
width:16em;
}
/* 220px */
.twotwenty{
width:22em;
}
/* 280px */
.twoeighty{
width:28em;
}
/* 340px */
.threeforty{
width:34em;
}
/* 400px */
.fourhun{
width:40em;
}
/* 460px */
.foursixty{
width:46em;
}
/* 520px */
.fivetwenty{
width:52em;
}
/* 580px */
.fiveeighty{
width:58em;
}
/* 640px */
.sixforty{
width:64em;
}
/* 700px */
.sevenhun{
width:70em;
}
/* 760px */
.sevensixty{
width:76em;
}
/* 820px */
.eighttwenty{
width:82em;
}
/* 880px */
.eighteighty{
width:88em;
}
/* 940px */
.nineforty{
width:94em;
}
/*
==NAV
---------------------------------------------------------------------------------------------------------------- */
ul#nav{
width:100%;
overflow:hidden;
list-style:none;
margin-bottom:1.5em;
}
ul#nav li{
float:left;
font-family:Helvetica, Arial, Verdana, sans-serif;
font-weight:bold;
}
ul#nav li a, ul#nav li a:visited{
color:#999;
text-decoration:none;
width:6.25em;
margin-right:1.25em;
display:block;
}
ul#nav li a:hover{
text-decoration:underline;
}
/*
==TYPE
---------------------------------------------------------------------------------------------------------------- */
/*--- =HEADINGS ---*/
h1,h2,h3,h4,h5,h6{
font-family:Helvetica, Arial, Verdana, sans-serif;
color:#666;
}
h1{ /* H1 is a bit hacky but it works */
font-size:2.4em;
line-height:2em;
margin-bottom:0.625em;
padding-top:0.375em;
margin-top:-1em;
}
h2{
font-size:2em;
line-height:1.2em;
margin-bottom:1.2em;
font-weight:bold;
margin-top:-1px;
padding-bottom:1px;
}
h3{
font-size:1.8em;
line-height:1.3333333333333333333333333333333em;
margin-bottom:1.3333333333333333333333333333333em;
font-weight:bold;
}
h4{
font-size:1.6em;
line-height:1.5em;
margin-bottom:1.5em;
font-weight:bold;
}
h5{
font-size:1.6em;
line-height:1.5em;
margin-bottom:1.5em;
}
h6{
font-size:1.3em;
line-height:1.8461538461538461538461538461538em;
margin-bottom:1.8461538461538461538461538461538em;
font-weight:bold;
}
h1.quote,h2.quote,h3.quote,h4.quote,h5.quote,h6.quote{ /* Apply this class to headings that open with quote marks to hang the punctuation */
text-indent:-0.35em;
}
h4.excerpt-title{
margin-left:3.75em;
}
/*--- =PARAGRAPHS ---*/
p{
font-size:1.6em;
line-height:1.5em;
margin-bottom:1.5em;
}
p.opener{
text-align:justify;
}
span.opener{ /* To be used <p><span class="opener">Text</span> more text.</p> This creates uppercase text on the first word in a paragraph, as seen in printed docs like newsapers */
font-variant:small-caps;
}
p.outdent{ /* Outdent a paragraph by 60px (one column) Only use if you have one column free to the left of the paragraph */
margin-left:-3.75em;
}
p.quote, p.hung{ /* Apply this class to paragraphs that open with quote marks to hang the punctuation */
text-indent:-0.5em;
}
p.excerpt{
text-align:justify;
width:17.5em;
margin:0 auto 1.5em auto;
border-top:medium double #000;
border-bottom:medium double #000;
padding:21px 0;
}
p.note{
color:#666;
font-family:Arial,Helvetica,Verdana,sans-serif;
text-align:justify;
font-size:1.2em;
line-height:2em;
margin-bottom:1.9em;
padding-top:1px;
}
/*--- =ELEMENTS ---*/
blockquote{
margin-left:-6em;
}
blockquote.left{
margin-right:2em;
width:28em;
}
blockquote p{
font-style:italic;
text-indent:-0.5em;
}
cite{
white-space:nowrap;
display:block;
text-indent:0;
padding-left:1.5em;
}
abbr{
color:#f43059;
border-bottom:1px dotted #f43059;
cursor:help;
}
strong{
font-weight:bold;
}
em{
font-style:italic;
}
code,pre{
font-family:"Lucida Console", "Courier New", Courier, monospace;
}
pre{
font-size:1.2em;
line-height:2em;
margin-bottom:2em;
margin-left:-5em;
width:100%;
}
code{
font-size:1em;
line-height:1em;
color:#038;
}
q{
font-style:italic;
}
address{
font-size:1.6em;
line-height:1.5em;
margin-bottom:1.5em;
}
ins{
background:#fedae3;
text-decoration:none;
}
/* --- =LINKS --- */
a{
color:#ed1c24;
}
a:visited{
color:#ed5a60;
}
a:hover{
text-decoration:none;
}
/*--- =LISTS ---*/
ul,ol,dl{
font-size:1.6em;
line-height:1.5em;
margin-bottom:1.5em;
}
ul{
list-style:square;
}
ol{
list-style:lower-roman;
}
ul,ol{
padding-left:1em;margin-left:-1em;/* This makes IE display hung bullets */
}
ul ul,ol ol{
font-size:1em;
line-height:1.5em;
margin:0 0 0 3.75em;
}
li.bulletless{
list-style:none;
}
dl{
margin-left:3.75em;
}
dl dt{
font-weight:bold;
font-family:Helvetica, Arial, Verdana, sans-serif;
}
dl dd{
margin-left:3.75em;
margin-bottom:1.5em;
}
/*--- =FIGURES AND MARGINALIA ---*/
.marginalia{
float:left;
margin-left:-120px;
width:100px;
}
.marginalia p, p.marginalia{
font-family:Arial, Helvetica, Verdana, sans-serif;
font-size:1.2em;
line-height:2em;
margin-bottom:2em;
color:#888;
}
p.marginalia{padding-top:1px;}
/*--- =OTHER ---*/
span.drop{
font-size:3em;
padding:0.2em;
margin-left:-0.2em;
float:left;
}
.inline-heading{
font-family:Helvetica, Arial, Verdana, sans-serif;
font-weight:bold;
}
.amp{ /* Give those ampersands a right sexy look */
font-family:Baskerville, "Goudy Old Style", "Palatino", "Book Antiqua", serif;
font-style:italic;
font-weight:normal;
line-height:1em;
}
/*
==FORMS
---------------------------------------------------------------------------------------------------------------- */
legend{
font-family:Helvetica, Arial, Verdana, sans-serif;
font-size:1.6em;
line-height:1.5em;
margin-bottom:1.5em;
font-weight:bold;
}
legend.hide{
display:none;
}
label{
float:left;
width:6.25em;
margin-right:1.25em;
}
input.text,textarea{
width:333px;
}
input.text{
padding:1px;
}
textarea{
height:184px;
}
input.button{
margin-left:9em;
}
p.button{
margin-left:7.5em;
}
/*
==IMAGES
---------------------------------------------------------------------------------------------------------------- */
img{
color:#666;
font-style:italic; /* Applies a font-style for alt text */
background:#ff8; /* Applies a font-style for alt text */
}
img.outdent{
margin:0 0 2.4em -12em;
border:1px solid #ccc;
}
img.left{
margin:0.6em 2em 0 -6em;
}
#sub-content img.left{
margin:0.6em 2em 0 -2em;
}
#sub-content p img.left{
margin:0.7em 1.66667em 0 -1.66667em;
}
#sub-content p a img.left{
outline:5px solid #fff;
}
#sub-content p a:hover img.left{
outline:5px solid #F43059;
}
p img.left{
margin-left:-3.75em;
margin-right:1.25em;
}
img.right{
margin:0.6em -6em 0 2em;
}
p img.right{
margin-right:-3.75em;
}
/*
==TABLES
---------------------------------------------------------------------------------------------------------------- */
table{
margin-bottom:2.4em;
}
table.outdent{
margin-left:-120px;
}
table.outdent caption{
margin-left:0;
}
caption{
font-family:Helvetica, Arial, Verdana, sans-serif;
font-weight:bold;
font-size:1.6em;
line-height:1.5em;
margin:0 0 1.5em -3.75em;
}
table th{
font-family:Helvetica, Arial, Verdana, sans-serif;
font-weight:bold;
text-align:center;
padding:0 1em;
border:1px solid #999;
}
table tr{
font-size:1.6em;
line-height:1.5em;
margin-bottom:1.5em;
}
table td{
padding:1.45em;
border:1px solid #ccc;
vertical-align:top;
}
table .empty{
border:none;
}
#punctuation-summary-table{
margin-left:-12em;
}
#punctuation-summary-table caption{
margin-left:3.75em;
}
/*
==MISC
---------------------------------------------------------------------------------------------------------------- */
.seo{
font-weight:normal;
font-style:normal;
}
.left{
float:left;
}
.right{
float:right;
}
legend.hide{
display:none;
}
.hide{
position:absolute;
left:-9999em;
}
.clear{
clear:both;
}
.text-right{
text-align:right;
}
.indent{ /* To be used mainly on divs to push them right by two columns */
margin-left:12em;
}
hr{
border:none;
border-bottom:medium double #000;
clear:both;
width:25em;
font-size:1.6em;
line-height:1.5em;
margin-bottom:1.3em;
}
#sub-content hr{
width:80%;
}
#toggle{
position:fixed;
right:1em;
bottom:1em;
border:1px solid #ccc;
background:#ddd;
padding:1em;
}
#toggle p{
line-height:1em;
margin:0;
}
.infoBox{
width:100%;
position:fixed;
left:0;
bottom:0;
background:#ff8;
border-top:1px solid #FF0;
}
.infoBox p{
font-size:10px;
padding:10px;
font-family:Verdana, Arial, Helvetica, sans-serif;
margin:0;
}
.infoBox a{
color:#00f;
}
#important-notice,.notice{
float:right;
width:34em;
outline:1em solid #ff8;
margin-left:2em;
background:#ff8;
}
#important-notice h2,.notice h2{
color:#f00;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment