-
Notifications
You must be signed in to change notification settings - Fork 0
/
elements-typography.html
167 lines (139 loc) · 12.4 KB
/
elements-typography.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="no-js ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<!-- CSS : implied media="all" -->
<link rel="stylesheet" href="css/style.css?v=2">
<!-- <link rel="stylesheet" href="css/naked.css?v=2"> -->
<!-- Uncomment if you are specifically targeting less enabled mobile browsers
<link rel="stylesheet" media="handheld" href="css/handheld.css?v=2"> -->
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects -->
<script src="js/libs/modernizr-2.0.min.js"></script>
<!-- Also put Selectivizr at the top -->
<script type="text/javascript" src="js/libs/mootools-core-1.3.1-full-compat-yc.js"></script>
<!--[if (gte IE 6)&(lte IE 8)]>
<script type="text/javascript" src="js/libs/selectivizr.js"></script>
<noscript><link rel="stylesheet" href="css/selectivizr.css" /></noscript>
<![endif]-->
</head>
<body>
<div id="page">
<header>
<hgroup>
<h1>The Coding Designer's Survival Kit</h1>
<h2>Typography (via <a href="#credit">Type-a-File</a>)</h2>
</hgroup>
</header>
<div id="main" role="main">
<article>
<h1><span class="kern">T</span>ype-a-file Gives Your Web <span class="kern">T</span>ypography a Head Start</h1>
<div class="kicker">
<p>Below you’ll find some text marked up with the core elements of Type-a-file. View the source code to find out how to use them on your own site. This element, for example is called a “kicker.” It’s paragraph text that introduces the rest of the text. It’s useful for outlining your topic & looks killer. Just create a div with class=“kicker” and throw some paragraphs into it. Blammo!</p>
</div>
<h2>The Typographic Basics</h2>
<img src="http://dummyimage.com/480x248/ccc/fff" alt="placeholder image" />
<div class="caption">You’ll often want to caption photos. This is a .caption class</div>
<p><span class="drop-cap">P</span>aragraphs are the core building block of typography online. You want to make sure you’ve got a good line-height and horizontal width—aka measure—for good readability. If you stack your lines too close together, or too far apart, lines become harder to read. Like a staircase where the steps are too shallow or too steep. The standard line-height online is something between 1.5 and 2.0 ems.<a href="#ems" class="superscript">1</a> If your lines stretch too far across the page reading can feel like a tedious marathon. The standard single-column width online is about 70-90 characters.</p>
<aside class="sidenote">
<h1>This is a “sidenote”</h1>
<p>It’s different than a sidebar because its content are directly related to the main content at left. When <abbr>html5</abbr> is more prevalent, you’ll be able to start using <code><aside></code> instead of a div with a class of .sidebar.</p>
<p>I’ve set it up here as a div which contains h1s for titles, as well as paragraphs.</p>
</aside>
<p>If you look at the source code you’ll notice how the .sidenote to the right was written before this paragraph, which it is supposed to directly relate to. You’ll probably want to set up your asides in the same manner.</p>
<p>These are the simple beginnings of Type-a-file. We’ve put in a lot of work to make good typography easier for you. Colors & structure we leave to you, but typographically, we got you covered. Download the file and follow the instructions for installing and setting it up. Now we’ll get into some of the <em>fancier</em> elements we’ve built into Type-a-file.</p>
<h2>Puttin’ on the Ritz</h2>
<p><span class="run-in">Sometimes you want an opening phrase to pop.</span> You could just put it in bold tags, but wouldn’t you rather use semantic markup?<a href="#semantics" class="superscript">2</a> We’ve created a class called .run-in so that you can! Best practices claim you’ll usually want to keep those run-ins to one line.</p>
<aside class="sidenote">
<h1>Another sidenote.</h1>
<p>I thought it might be interesting to show you that you can put lists into sidenotes:</p>
<ul>
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
<li>Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam</li>
</ul>
</aside>
<p>Typically you want a nice, steady vertical rhythm to your page. Of course, some folks don’t <span class="pullquote">Speaking of intelligently deviating…</span>think that it’s actually necessary on the web to stick to a baseline grid, but it can be a great guide from which you can intelligently deviate. Speaking of intelligently deviating, there are some key elements that make great deviations from the monotony of paragraphs: the “quotes.” These include blockquotes and a special Type-a-file class named “pullquote.” The latter is above, the former below:</p>
<blockquote>
<p>Headings, subheads, block quotations, footnotes, illustrations, captions and other intrusions into the text create syncopations and variations against the base rhythm of regularly leaded lines. These variations can and should add life to the page, but the main text should also return after each variation precisely on beat and in phase.</p>
</blockquote>
<cite>Robert Bringhurst</cite>
<h2>Delineate, Demonstrate, Define</h2>
<p>This Type-a-file would of course be incomplete without specifications for lists, codes & definitions. It’s fairly common to indent both blockquotes and list elements, but seriously consider left aligning your text for these items and outdenting their bullets & other visual demarcations. It can present a cleaner appearance while also drawing focused attention to information points.</p>
<ol>
<li>This is a list that is well ordered.</li>
<li>It starts with one and goes to two.</li>
<li>Then it has a third item.</li>
<li>Followed by the fourth, and—in this case—last item.</li>
</ol>
<ul>
<li>Un-ordered lists are just as simple.</li>
<li>The only difference being that the items are marks by bullets instead of numbers.</li>
<li>Don’t forget that lists can have list titles.</li>
<li>Finally we’ve reached the last un-ordered item.</li>
</ul>
<p>If you’re a blogger geek, sooner or later you’ll want to tell everybody about some ripping <abbr>css</abbr> coding you concocted by posting it on your blog-o-tubes. So we’ve got you covered.</p>
<pre><code>#header h1 a {
display: block;
width: 300px;
height: 80px;
}</code></pre>
<p>Then, since you’re an uber-geek-dufus-man-child who’s fascinated by proving to the world you have sooooo much knowledge to share, you’ll probably want to post some definitions or definition-like information where a title element is closely linked with a description of some kind. We got ya.</p>
<dl>
<dt>Type-a-file</dt>
<dd>A really awesome way to get your site up to typographic snuff. It uses traditional semantic HTML tags along with some additional semantic classes named after commonly occurring elements in print design to create a solid typographic toolkit for your website, whoever you are.</dd>
<dt>CSS</dt>
<dd>CSS stands for Cascading Style Sheet. This is a document format which provides a set of style rules which can then be incorporated in an XHTML or HTML document. It is a means to separate web content from formatting and presentation information. CSS is also a Brazilian rock band from São Paulo. The band was labeled as part of the explosion of the New Rave scene. Their songs are in both English and Portuguese. CSS is an abbreviation for Cansei de Ser Sexy , literally “tired of being sexy” in Portuguese.</dd>
</dl>
<p>You see how that works? You need something done typographically, Type-a-file does it. That simple. Now what are you waiting for? Find a flavor that suits your mood and go to town. Download the zip file. All the directions and files you’ll need will be squished inside. Oh, and when you’ve become a master <abbr>css</abbr>er and start making your own flavors of Type-a-file, come back and share them with the Type-a-file community!</p>
<small>This is just a <code>small</code> element. It’s really useful when you want to add a small note or bit of text to something that’s perhaps less important or a clarification of something. Another option in an arsenal of options.</small>
<ol class="footnote">
<li id="ems"><span class="run-in">All about ems:</span> An em is a unit of measurement in the field of typography. This unit defines the proportion of the letter width and height with respect to the point size of the current font. Originally the unit was derived from the width of the capital “M” in the currently used typeface. This unit is not defined in terms of any specific typeface, and thus is the same for all fonts at a given point size. So, 1 em in a 16 point typeface is 16 points</li>
<li id="semantics"><span class="run-in">Semantic Web:</span> A group of methods and technologies to allow machines to understand the meaning—or “semantics”—of information on the World Wide Web. The term was coined by World Wide Web Consortium (W3C) director Tim Berners-Lee. According to the original vision, the availability of machine-readable metadata would enable automated agents and other software to access the Web more intelligently. The agents would be able to perform tasks automatically and locate related information on behalf of the user.</li>
</ol>
</article>
</div>
<footer>
<footer id="credit">
This markup is from the <a href="http://type-a-file.com">Type-a-File</a> project.
<div class="commons">
Type-a-file is a <a href="http://www.strangenative.com" target="_blank">StrangeNative</a> product licensed under <a class="cc" href="http://www.creativecommons.com"> creative commons.</a> You're free to use it commercially or non-commercially. Just keep that credit line in there!
</div>
</footer>
</footer>
</div> <!--! end of #container -->
<!-- JavaScript at the bottom for fast page loading -->
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.5.2.min.js"%3E%3C/script%3E'))</script>
<!-- Formalize (http://formalize.me) -->
<script src="js/libs/formalize/jquery.formalize.js"></script>
<!-- Lettering.js -->
<!-- <script src="js/libs/jquery.lettering.js"></script> -->
<!-- scripts concatenated and minified via ant build script-->
<script src="js/script.js"></script>
<!-- end concatenated and minified scripts-->
<!--[if lt IE 7 ]>
<script src="js/libs/dd_belatedpng.js"></script>
<script>DD_belatedPNG.fix('img, .png_bg'); // Fix any <img> or .png_bg bg-images. Also, please read goo.gl/mZiyb </script>
<![endif]-->
<!-- mathiasbynens.be/notes/async-analytics-snippet Change UA-XXXXX-X to be your site's ID -->
<script>
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>