Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 6a4374f1b6
Fetching contributors…

Cannot retrieve contributors at this time

990 lines (882 sloc) 42.487 kB
<!doctype html>
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="robots" content="all">
<title>Typeplate » A typographic starter kit encouraging great type on the Web</title>
<script>
(function() {var config = {kitId: 'wxt4lbk',scriptTimeout: 3000};
var h=document.getElementsByTagName("html")[0];h.className+=" wf-loading";var t=setTimeout(function(){h.className=h.className.replace(/(\s|^)wf-loading(\s|$)/g," ");h.className+=" wf-inactive"},config.scriptTimeout);var tk=document.createElement("script"),d=false;tk.src='//use.typekit.net/'+config.kitId+'.js';tk.type="text/javascript";tk.async="true";tk.onload=tk.onreadystatechange=function(){var a=this.readyState;if(d||a&&a!="complete"&&a!="loaded")return;d=true;clearTimeout(t);try{Typekit.load(config)}catch(b){}};var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(tk,s)
})();
</script>
<meta name="description" content="A typographic starter kit for Web developers and designers, where we don’t make too many design choices, but we do set out patterns for proper markup and “pre-designed” styles.">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=1">
<link rel="stylesheet" href="./css/main.css?1.0.1">
<script src="./js/vendor/modernizr.min.js"></script>
</head>
<body>
<!-- $banner -->
<header class="header botDivider column" role="banner">
<div class="col-wrap">
<!-- oppa csswizardry style: http://csswizardry.com/2013/01/your-logo-is-still-an-image-and-so-is-mine -->
<a href="." class="logo">
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt="Typeplate" class="logo-img">
</a>
<nav class="nav nav-primary" role="navigation">
<a href="./demo.html" class="nav-item epsilon" rel="bookmark">demo</a>
<a href="//github.com/typeplate/typeplate.github.com/blob/master/README.md" class="nav-item epsilon" rel="external">instructions</a>
<a href="//github.com/TypePlate/typeplate.github.com/issues" class="nav-item epsilon" rel="external">feedback</a>
</nav>
<nav class="social-nav">
<a href="//github.com/typeplate/typeplate.github.com" class="social-item" rel="me"><i class="icon-github"></i>Fork</a>
<a href="//twitter.com/typeplate" class="social-item" rel="me"><i class="icon-twitter"></i>Follow</a>
</nav>
<div class="lede">
<p class="delta">Frameworks make decisions for you about how to organize, structure and design a site. Pattern libraries don’t separate styling and markup, making them tough to use in a truly modular fashion. We weren’t satisfied, so we made a thing that doesn’t do that.</p>
<p><i><b>Typeplate</b></i> is a “typographic starter kit”. We don’t make aesthetic design choices, but define <b>proper markup with extensible styling</b> for common typographic patterns. A stripped-down Sass library concerned with the appropriate technical implementation of design patterns—not how they look.</p>
</div>
</div>
</header>
<nav class="downloads nav">
<div class="col-wrap">
<a href="//raw.github.com/typeplate/typeplate.github.com/master/scss/_typeplate.scss" class="dl-item">
<i class="icon-download"></i>Sass
<hr>
<small>v1.0.1 | 3kb</small>
</a>
<a href="//raw.github.com/typeplate/typeplate.github.com/master/less/typeplate.less" class="dl-item">
<i class="icon-download"></i>LESS Port
<hr>
<small>v1.0.1 | 3kb</small>
</a>
<a href="//raw.github.com/typeplate/typeplate.github.com/master/stylus/typeplate.styl" class="dl-item">
<i class="icon-download"></i>Stylus Port
<hr>
<small>v1.0.1 | 3kb</small>
</a>
<a href="//raw.github.com/typeplate/typeplate.github.com/master/css/typeplate-unminified.css" class="dl-item">
<i class="icon-download"></i>Raw CSS
<hr>
<small>v1.0.1 | 7kb</small>
</a>
</div>
</nav>
<div class="col-wrap">
<!-- $table of contents -->
<section class="toc" id="table-of-contents">
<header>
<h1 class="delta center capsify">Table of Contents <b class="icon-download"></b></h1>
</header>
<div id="drawer" class="visuallyhidden">
<!-- 1. Base Type -->
<ol>
<li><a href="#base-type">Base Type</a></li>
<li><a href="#typographic-scale">Typographic Scale</a></li>
<li><a href="#color">Color</a></li>
<li><a href="#word-wrap">Word-wrap</a></li>
</ol>
<!-- 2. Paragraphs -->
<ol>
<li><a href="#indenting">Indenting</a></li>
<li><a href="#hyphenation">Hyphenation</a></li>
</ol>
<!-- 3. Detailing -->
<ol>
<li><a href="#small-caps">Small Capitals</a></li>
<li><a href="#drop-caps">Drop Capitals</a></li>
<li><a href="#unicode-ampersands">Unicode Ampersands</a></li>
<li><a href="#small-print">Small Print</a></li>
</ol>
<!-- 4. Pattern Modules -->
<ol>
<li><a href="#code-blocks">Code Blocks</a></li>
<li><a href="#figures">Figures</a></li>
<li><a href="#block-quotes">Block Quotes</a></li>
<li><a href="#pull-quotes">Pull Quotes</a></li>
<li><a href="#stats-tabs">Stats Tabs</a></li>
<li><a href="#footnotes">Footnotes</a></li>
<li><a href="#definition-lists">Definition Lists</a></li>
</ol>
</div>
</section>
<!-- #base-type -->
<section class="base-type botDivider" id="base-type">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#base-type">§</a> 1.1 Base Type</h1>
</header>
<p>For our base we use the following font settings on our <abbr title="hyper text markup language"><code>HTML</code></abbr> element to standardize the typographic scale in a consistent manner. We also make sure not to use united values for our line-heights per the <a href="http://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights" rel="external">recommendations of Mr. Eric Meyer himself</a>.</p>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">$weight: normal;
$line-height: 1.65;
$font-size: 112.5; // percentage value (16 * 112.5% = 18px)
$font-base: 16 * ($font-size/100); // converts our percentage to a pixel value
$font-family: serif;
$font-family-sans: sans-serif;
$font-properties: $weight, $line-height, $font-size, $font-family;
//the serif boolean var can be redeclared from another stylesheet. However
//the var must be placed after your @import "typeplate.scss";
$serif-boolean: true !default;
@mixin base-type($weight, $line-height, $font-size, $font-family...) {
@if $serif-boolean {
font: $weight #{$font-size}%/#{$line-height} $font-family;
}@else {
font: $weight #{$font-size}%/#{$line-height} $font-family-sans;
}
}
html {
@include base-type($font-properties...);
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #typographic-scale -->
<section class="typographic-scale botDivider" id="typographic-scale">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#base-type">§</a> 1.2 Typographic Scale</h1>
</header>
<p>Establish clearly distinguishable heading levels with font-size. Don’t randomly pick font sizes, choose a type hierarchy that is harmonious and consistent. Always <a href="http://www.alistapart.com/articles/more-meaningful-typography" rel="external">use a modular scale</a> that calculates those sizes from a ratio ensuring your design and typography can relate in a meaningful way. There’s an excellent calculator for this at <a href="http://modularscale.com" rel="external">modularscale.com</a>.</p>
<blockquote cite="http://www.alistapart.com/articles/more-meaningful-typography">
<p>By using culturally relevant, historically pleasing ratios to create modular scales and basing the measurements in our compositions on values from those scales, we can achieve a visual harmony not found in layouts that use arbitrary, conventional, or easily divisible numbers.</p>
<cite class="author"><small><a href="http://www.alistapart.com/articles/more-meaningful-typography" rel="external">Tim Brown</a></small></cite>
</blockquote>
<figure class="example scale-example">
<p class="giga no-indent">Heading Giga</p>
<p class="mega no-indent">Heading Mega</p>
<p class="alpha no-indent">Heading Alpha</p>
<p class="beta no-indent">Heading Beta</p>
<p class="gamma no-indent">Heading Gamma</p>
<p class="delta no-indent">Heading Delta</p>
<p class="epsilon no-indent">Heading Epsilon</p>
<p class="zeta no-indent">Heading Zeta</p>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">&lt;h1 class=&quot;giga&quot;&gt;Heading Giga&lt;/h1&gt;
&lt;h1 class=&quot;mega&quot;&gt;Heading Mega&lt;/h1&gt;
&lt;h1 class=&quot;alpha&quot;&gt;Heading Alpha&lt;/h1&gt;
&lt;h2 class=&quot;beta&quot;&gt;Heading Beta&lt;/h2&gt;
&lt;h3 class=&quot;gamma&quot;&gt;Heading Gamma&lt;/h3&gt;
&lt;h4 class=&quot;delta&quot;&gt;Heading Delta&lt;/h4&gt;
&lt;h5 class=&quot;epsilon&quot;&gt;Heading Epsilon&lt;/h5&gt;
&lt;h6 class=&quot;zeta&quot;&gt;Heading Zeta&lt;/h6&gt;</code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">$measure: $font-base * $line-height;
// Modular Scale Values
$tera: 117; // 117 = 18 × 6.5
$giga: 90; // 90 = 18 × 5
$mega: 72; // 72 = 18 × 4
$alpha: 60; // 60 = 18 × 3.3333
$beta: 48; // 48 = 18 × 2.6667
$gamma: 36; // 36 = 18 × 2
$delta: 24; // 24 = 18 × 1.3333
$epsilon: 21; // 21 = 18 × 1.1667
$zeta: 18; // 18 = 18 × 1
// typscale unit
$type-scale-unit-value: rem;
// typographic scale
@mixin modular-scale($scale, $base, $value, $measure:"") {
font-size: $scale#{px};
font-size: modular-scale($scale, $base, $value);
@if $measure != "" {
margin-bottom: measure-margin($scale, $measure, $value);
}
}
// modular scale function to return em equivalent
@function modular-scale($scale, $base, $value) {
// divide a given font-size by base font-size & return a relative em value
@return ($scale/$base)#{$value};
}
// divide 1 unit of measure by given font-size & return a relative em value
@function measure-margin($scale, $measure, $value) {
@return ($measure/$scale)#{$value};
}
// styles for all headings, in the style of @csswizardry
%hN {
// voodoo to enable ligatures and kerning
text-rendering: optimizeLegibility;
// this fixes huge spaces when a heading wraps onto two lines
line-height: 1;
margin-top: 0;
}
// make a multi-dimensional array, where:
// the first value is the name of the class
// and the second value is the variable for the size
$sizes: tera $tera, giga $giga, mega $mega, alpha $alpha, beta $beta, gamma $gamma, delta $delta, epsilon $epsilon, zeta $zeta;
// associate h1-h6 tags with their appropriate greek heading
@each $size in $sizes {
.#{nth($size, 1)} {
@include modular-scale(nth($size, 2), $font-base, '#{$type-scale-unit-value}', $measure);
}
}
// associate h1-h6 tags with their appropriate greek heading
h1 { @extend .alpha; @extend %hN; }
h2 { @extend .beta; @extend %hN; }
h3 { @extend .gamma; @extend %hN; }
h4 { @extend .delta; @extend %hN; }
h5 { @extend .epsilon; @extend %hN; }
h6 { @extend .zeta; @extend %hN; }</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #color -->
<section class="color botDivider" id="color">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#color">§</a> 1.3 Color</h1>
</header>
<p>Just like in print, don’t use the darkest black available in your body text (#000). Instead, go for something softer, like #444. You can use a slightly darker color for titles (#222).</p>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">$body-copy-color: #444;
$heading-color: #222;
body {
color: $body-copy-color;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: $heading-color;
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #word-wrap -->
<section class="word-wrap botDivider" id="word-wrap">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#color">§</a> 1.4 Word-wrap</h1>
</header>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odio iste voluptates saepe ipsa magni repellendus explicabo numquam expedita dolore eveniet accusantium iure sit consequatur? Dolore minus vel blanditiis velit deserunt! We’ll also be checking a few things like the longest word in the world “Methionylthreonylthreonylglutaminylarginylisoleucine” and other stuff like links that are way long such as <a href="http://google.com" rel="external">“Methionylthreonylthreonylglutaminylarginylisoleucine”</a> and other long links like <a href="http://google.com" rel="external">http://192.168.1.100/somedirectory/stayout/of/my/shit</a></p>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">// Silent Sass Classes - A.K.A Placeholders
//
// normal: Indicates that lines may only break at normal word break points.
// break-word : Indicates that normally unbreakable words may be broken at ...
// arbitrary points if there are no otherwise acceptable break points in the line.
%breakword {
word-wrap: break-word;
}
%normal-wrap {
word-wrap: normal;
}
%auto-wrap {
word-wrap: auto;
}
body {
@extend %breakword;
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #indenting -->
<section class="indenting botDivider" id="indenting">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#indenting">§</a> 2.1 Indenting</h1>
</header>
<p>On the web, paragraphs are commonly set in blocks, with top and bottom margins. Historically, paragraphs are set using indentation, which makes it easier to scan long-form text and are (we think) more conducive to readability.</p>
<figure class="example no-top-pad">
<p>I crawled out almost immediately, and crouched, my feet still in the water, under a clump of furze. The horse lay motionless (his neck was broken, poor brute!) and by the lightning flashes I saw the black bulk of the overturned dog cart and the silhouette of the wheel still spinning slowly. In another moment the colossal mechanism went striding by me, and passed uphill towards Pyrford.</p>
<p>Seen nearer, the Thing was incredibly strange, for it was no mere insensate machine driving on its way. Machine it was, with a ringing metallic pace, and long, flexible, glittering tentacles (one of which gripped a young pine tree) swinging and rattling about its strange body.</p>
<p>It picked its road as it went striding along, and the brazen hood that surmounted it moved to and fro with the inevitable suggestion of a head looking about. Behind the main body was a huge mass of white metal like a gigantic fisherman’s basket, and puffs of green smoke squirted out from the joints of the limbs as the monster swept by me. And in an instant it was gone.</p>
<p>So much I saw then, all vaguely for the flickering of the lightning, in blinding highlights and dense black shadows.</p>
<p>As it passed it set up an exultant deafening howl that drowned the thunder—“Aloo! Aloo!”—and in another minute it was with its companion, half a mile away, stooping over something in the field. I have no doubt this Thing in the field was the third of the ten cylinders they had fired at us from Mars.</p>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">//paragraph siblings indent
$indent-val: 1.5em;
p {
& + p {
text-indent: $indent-val;
margin-top: -$indent-val;
}
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #hyphenation -->
<section class="hyphenation botDivider" id="hyphenation">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#hyphenation">§</a> 2.2 Hyphenation</h1>
</header>
<p>Responsive or not, there’s no reason why we shouldn’t all be designing and building sites on flexible foundations. In a fluid layout, browser width and typographic measure are linked: the wider the viewport, the more characters per line. Keeping in mind that a range of 45-75 characters per line is generally accepted as safe for comfortable reading, there are a few things that can be done to avoid extra long lines of text in fluid layouts. <a href="http://www.amazon.com/Elements-Typographic-Style-Robert-Bringhurst/dp/0881792063" rel="external">Robert Bringhurst</a> recommends for us to leave at least two characters behind and take at least three forward.</p>
<blockquote cite="http://nicewebtype.com/notes/2013/01/16/where-to-avoid-css-hyphenation">
<p>Since hyphens is an inherited property, it isn’t sufficient to set it for a limited number of elements and assume you’re done. You have to make sure you’ve turned it off for the elements that shouldn’t be hyphenated.</p>
<cite class="author"><small><a href="http://meyerweb.com/eric/thoughts/2012/12/17/where-to-avoid-css-hyphenation/" rel="external">Eric Meyer</a></small></cite>
</blockquote>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">@mixin css-hyphens($val) {
// Accepted values: [ none | manual | auto ]
-webkit-hyphens: $val; // Safari 5.1 thru 6, iOS 4.2 thru 6
-moz-hyphens: $val; // Firefox 16 thru 20
-ms-hyphens: $val; // IE10
-o-hyphens: $val; // PRESTO...haha LOL
hyphens: $val; // W3C standard
};
body {
// Ala Trent Walton
// http://trentwalton.com/2011/09/07/css-hyphenation
@include css-hyphens(auto);
}
abbr,
acronym,
blockquote,
code,
dir,
kbd,
listing,
plaintext,
q,
samp,
tt,
var,
xmp {
// http://meyerweb.com/eric/thoughts/2012/12/17/where-to-avoid-css-hyphenation
@include css-hyphens(none);
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #small-capitals -->
<section class="small-caps botDivider" id="small-caps">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#small-caps">§</a> 3.1 Small Capitals</h1>
</header>
<p>Small caps help to make abbreviations way easier to read but won’t stand out from the text. We highly suggest this bit of typographic flare with your content. True small capitals are now possible on the web, <a href="http://blog.hypsometry.com/articles/true-small-capitals-with-font-face" rel="external">but alas they are still a bitch</a> and will also depend on the type face in use. Definitely check out <a href="//opentypography.org/fontlist.html" rel="external">Open Typography</a> for those typefaces and services that provide authentic small caps.</p>
<figure class="example no-top-pad">
<p>Lorem ipsum dolor sit amet, consectetur <abbr title="hyper text markup language">HTML</abbr> adipisicing elit. <abbr title="cascading styling sheets">CSS</abbr> Laboriosam voluptatem a beatae accusantium accusamus dolor provident error consectetur quibusdam suscipit neque temporibus. Velit omnis voluptatum quasi tempora reiciendis expedita reprehenderit.</p>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">&lt;abbr title=&quot;hyper text markup language&quot;&gt;HTML&lt;/abbr&gt;</code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-css">@mixin smallcaps($color, $font-weight) {
// depends on the font family.
// some font-families don’t support small caps
// or don’t provide them with their web font.
font-variant: small-caps;
font-weight: $font-weight;
text-transform: lowercase;
color: $color;
}
abbr {
@include smallcaps(gray, 600);
&:hover {
cursor: help;
}
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #drop-capitals -->
<section class="drop-capitals botDivider" id="drop-caps">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#drop-caps">§</a> 3.2 Drop Capitals</h1>
</header>
<p>A Drop Cap is the art of using an uppercase glyph to mark the start of copy. A technique that has been around for almost two thousand years!</p>
<figure class="example">
<p class="drop-cap">There now is your insular city of the Manhattoes, belted round by wharves as Indian isles by coral reefs—commerce surrounds it with her surf. Right and left, the streets take you waterward. Its extreme downtown is the battery, where that noble mole is washed by waves, and cooled by breezes, which a few hours previous were out of sight of land. Look at the crowds of water-gazers there.</p>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">&lt;p class=&quot;drop-cap&quot;&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit. Unde in aliquid rem. Esse laboriosam nisi quas eveniet atque consequatur perferendis nostrum dignissimos magni cum suscipit delectus nam placeat qui rem.&lt;/p&gt;</code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">// Use ‘@include dropcap()’ with any selector. Pass in your own custom
// arguments or feel free to use the arguments we’ve provided.
@mixin dropcap($float: left, $font-size: 4em, $font-family: inherit, $text-indent: 0, $margin: inherit, $padding: inherit, $color: inherit, $lineHeight: 1, $bg: transparent) {
&:first-letter {
float: $float;
margin: $margin;
padding: $padding;
font-size: $font-size;
font-family: $font-family;
line-height: $lineHeight;
text-indent: $text-indent;
background: $bg;
color: $color;
}
}
// Including the @mixin with our .drop-cap class purely for demo purposes.
// Not included in the actual Typeplate Sass or CSS download.
.drop-cap {
@include dropcap($margin: 0 .5em auto 0, $padding: .5em, $color: #fff, $bg: #333);
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #unicode-ampersands -->
<section class="ampersands botDivider" id="unicode-ampersands">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#unicode-ampersands">§</a> 3.3 Unicode Ampersands</h1>
</header>
<p>With the <code>unicode-range</code> property we can avoid using verbose markup and only target the characters we like according to the unicode unique identifier. We also harness the power of the <code>%placeholder</code> in Sass allowing like minded selectors to string together this shared property in a DRY way from one single declaration. Copy and paste the Sass below into <a href="http://codepen.io/pen" rel="external">Codepen</a> and check out the output for yourself. Hint: create multiple classes.</p>
<figure class="example amp-example">
<p class="amp">Amper & Sands</p>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">//Unicode Ampersand @font-face
$amp-fontface-name: Ampersand;
$amp-fontface-source: local('Georgia'), local('Garamond'), local('Palatino'), local('Book Antiqua');
$amp-fontface-fallback: local('Georgia');
// Allows for our ampersand element to have differing
// font-family from the ampersand unicode font-family.
$amp-font-family: Verdana, sans-serif;
@font-face {
font-family: '#{$amp-fontface-name}';
src: $amp-fontface-source;
unicode-range: U+0026;
}
// Ampersand fallback font for unicode range
@font-face {
font-family: '#{$amp-fontface-name}';
src: $amp-fontface-fallback;
unicode-range: U+270C;
}
@mixin ampersand($amp-font-family...) {
font-family: $amp-font-family;
}
%ampersand-placeholder {
@include ampersand($amp-fontface-name, $amp-font-family);
}
// Call your ampersand on any element you wish from another stylesheet
// using this Sass extend we’ve provided.
.amp {
@extend %ampersand-placeholder;
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #small-print -->
<section class="small-print botDivider" id="small-print">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#code-blocks">§</a> 3.4 Small Print</h1>
</header>
<p>The <code>small</code> element is used to represent side comments or what’s commonly referred to as ‘small print’: disclaimers, caveats, legal restrictions, or copyrights. It can also be used for attributions or satisfying licensing requirements.</p>
<blockquote cite="http://html5doctor.com/small-hr-element/">
<p><code>small</code> is now for side comments, which are the inline equivalent of <code>aside</code>—content which is not the main focus of the page. A common example is inline legalese, such as a copyright statement in a page footer, a disclaimer, or licensing information. It can also be used for attribution. Don’t use it for block-level content (paragraphs, lists, etc.), as this would be considered main content.</p>
<p><code>small</code> text does not need to be smaller than surrounding text—if all you want is smaller text use CSS instead. Use <code>small</code> only on inline content.</p>
<cite>
<small><a href="http://html5doctor.com/small-hr-element/">Oli Studholme</a></small>
</cite>
</blockquote>
<figure class="example no-top-pad">
<p class="zeta">Buy one widget, get one free!
<small>(While supplies last. Offer expires on the vernal equinox. Not valid in Ohio.)</small>
</p>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">&lt;small&gt;(While supplies last. Offer expires on the vernal equinox. Not valid in Ohio.)&lt;/small&gt;</code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">small {
font-size: 65%;
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- $Code Blocks -->
<section class="code-blocks botDivider" id="code-blocks">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#code-blocks">§</a> 4.1 Code Blocks</h1>
</header>
<p><code>Monospace</code> fonts just like you like for all your code block dreams! Monospace fonts or <i>“fixed pitch”</i> fonts, contain characters that all have the same character width. ‘l’, ‘1’ and ‘i’ are easily distinguished with monospace, ‘0’, ‘o’ and ‘O’ are easily distinguished and clear punctuation characters, especially braces, parenthesis and brackets.</p>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">h1 {
background: red;
color: blue;
padding: 1em;
margin: 3em;
border: 2px solid black;
}</code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">@mixin white-space($wrap-space) {
@if $wrap-space == 'pre-wrap' {
white-space: #{-moz-}$wrap-space; // Firefox 1.0-2.0
white-space: $wrap-space; // current browsers
} @else {
white-space: $wrap-space;
}
}
pre code {
@extend %normal-wrap;
@include white-space(pre-wrap);
}
pre {
@include white-space(pre);
}
code {
@include white-space(pre);
font-family: monospace;
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #figures -->
<!-- [1/6/13 7:09:04 PM] Zak Kain: I think what’s missing here is the html markup component, for the more complex sections (like figure). Setting some baseline CSS for figure is difficult without being too restrictive in styling, but you can offer markup patterns for "how to do a proper figure with caption, citation etc". Same goes for blockquotes (which I have a lot of work on actually, I’ll pull-request you when this is live) -->
<section class="figures botDivider" id="figures">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#figures">§</a> 4.2 Figures</h1>
</header>
<figure class="example">
<img src="http://designingfortheweb.co.uk/book/images/typography-anatomy_b.gif" alt="">
<figcaption class="example-figcaption">
<strong>Fig. 4.2 | </strong>Type Anatomy, an excerpt from Mark Boulton’s book <cite title="http://designingfortheweb.co.uk/book/part3/part3_chapter11.php">“Designing for the Web”</cite>
</figcaption>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">&lt;figure&gt;
&lt;figcaption&gt;
&lt;strong&gt;Fig. 4.2 | &lt;/strong&gt;Type Anatomy, an excerpt from Mark Boulton&#039;s book&lt;cite title=&quot;http://designingfortheweb.co.uk/book/part3/part3_chapter11.php&quot;&gt;“Designing for the Web”&lt;/cite&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #block-quotes -->
<!-- http://html5doctor.com/blockquote-q-cite -->
<section class="block-quotes botDivider" id="block-quotes">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#block-quotes">§</a> 4.3 Block Quotes</h1>
</header>
<p>The blockquote element represents a section that is being quoted from another source.</p>
<figure class="example no-top-pad">
<blockquote cite="http://where-i-got-my-info-from.com">
<p>“Embracing the fluid &amp; flexible aspect of responsive web design was an easy decision, but I’ve been less sure-footed when it comes to balancing that with setting type on the web”</p>
<cite>
<small><a href="http://trentwalton.com/2012/06/19/fluid-type">Trent Walton</a></small>
</cite>
</blockquote>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">&lt;blockquote cite=&quot;&quot;&gt;
&lt;p&gt;&amp;Prime;&amp;Prime;&lt;/p&gt;
&lt;cite&gt;
&lt;small&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/small&gt;
&lt;/cite&gt;
&lt;/blockquote&gt;</code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">@mixin cite-style($display:block, $text-align:right, $font-size: .875em) {
display: $display;
font-size: $font-size;
text-align: $text-align;
}
%cite {
@include cite-style;
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #pull-quotes -->
<!-- http://24ways.org/2005/swooshy-curly-quotes-without-images -->
<!-- http://www.smashingmagazine.com/2008/06/12/block-quotes-and-pull-quotes-examples-and-good-practices/ -->
<section class="pull-quotes botDivider" id="pull-quotes">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#pull-quotes">§</a> 4.4 Pull Quotes</h1>
</header>
<p>Pull Quotes are tricky, but with this little ditty they’re not so difficult or tedious anymore. The example is an improvement based upon the <a href="http://24ways.org/2005/swooshy-curly-quotes-without-images" rel="external" target="blank">24 ways article discussing swooshy curly quotes without images.</a> This particular example depicted takes advantage of psuedo selectors and the <code>&lt;aside&gt;</code> tag.</p>
<figure class="example no-top-pad pull-example">
<aside class="pull-quote">
<blockquote>
<p>Most people who use Helvetica, use it because it's ubiquitous. It's like going to McDonald's instead of thinking about food. Because it's there, it's on every street corner, so let's eat crap because it's on the corner.</p>
</blockquote>
</aside>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">&lt;aside class=&quot;pull&ndash;quote&quot;&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/aside&gt;</code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">@mixin pull-quotes($font-size, $opacity) {
position: relative;
padding: ems($font-size, $font-size);
&:before,
&:after {
height: ems($font-size, $font-size);
opacity: $opacity;
position: absolute;
font-size: $font-size;
}
&:before {
content: '“';
top: 0em;
left: 0em;
}
&:after {
content: '”';
bottom: 0em;
right: 0em;
}
}
.pull-quote {
@include pull-quotes(4em, .15);
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #stats-tabs -->
<section class="stats botDivider" id="stats-tabs">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#stats-tabs">§</a> 4.6 Stats Tabs ala Pears</h1>
</header>
<figure class="example no-top-pad">
<ul class="stats-tabs">
<li><a href="#">1,234 <b>Stratocasters</b></a></li>
<li><a href="#">567 <b>Acoustic</b></a></li>
<li><a href="#">23,456 <b>Banjo</b></a></li>
<li><a href="#">3,456 <b>Dulcimer</b></a></li>
<li><a href="#">456 <b>Ukes</b></a></li>
<li><a href="#">26 <b>Bass Guitar</b></a></li>
</ul>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">&lt;!-- Stats Tabs --&gt;
&lt;ul class=&quot;stats-tabs&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;[value]&lt;b&gt;[name]&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">//Stats Tabs Variables
$stats-font-size: 1.125rem;
$stats-list-margin: 0 0.625rem 0 0;
$stats-list-padding: 0 0.625rem 0 0;
$stats-item-font-size: 0.1875rem;
$stats-item-margin: 0.125rem 0 0 0;
$stats-border-style: 0.125rem solid #ccc;
// Stats Tabs Styles
.stats-tabs {
li {
display: inline-block;
margin: $stats-list-margin;
padding: $stats-list-padding;
border-right: $stats-border-style;
&:last-child {
margin: 0;
padding: 0;
border: none;
}
a {
//float: left;
display: inline-block;
font-size: $stats-font-size;
font-weight: bold;
span {
display: block;
margin: $stats-item-margin;
font-size: $stats-item-font-size;
font-weight: normal;
}
}
}
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #footnotes -->
<section class="footnotes botDivider" id="footnotes">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#footnotes">§</a> 4.7 Footnotes</h1>
</header>
<figure class="example no-top-pad">
<article>
<p>The sites we’ve built to display on a desktop, smartphone, or a tablet today could be on a TV Screen, coffee table display, or mega space yacht projection system tomorrow. Do yourself a favor and heed the advice of the Dao: A fully-scalable web<sup><a href="#fn-item1" id="fn-return">1</a></sup></p>
<footer class="foot-note">
<ol>
<li id="fn-item1">Style sheets that use relative units can more easily scale from one output environment to another. Most of the time I use em and rem. <a href="#fn-return">↩</a></li>
</ol>
</footer>
</article>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">&lt;!-- Footnote Markup : Replace ‘X” with your unique number for each footnote --&gt;
&lt;article&gt;
&lt;p&gt;&lt;sup&gt;&lt;a href=&quot;#fn-itemX&quot; id=&quot;fn-returnX&quot;&gt;&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;footer&gt;
&lt;ol class=&quot;foot-notes&quot;&gt;
&lt;li id=&quot;fn-itemX&quot;&gt;&lt;a href=&quot;#fn-returnX&quot;&gt;&#x21a9;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/footer&gt;
&lt;/article&gt;</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<!-- #definition-lists -->
<section class="definition-lists botDivider" id="definition-lists">
<header>
<h1 class="gamma section-title"><a class="perma-anchor" href="#definition-lists">§</a> 4.8 Definition Lists</h1>
</header>
<p>The dl element is for another type of list called a definition list. Instead of list items, the content of a dl consists of dt (Definition Term) and dd (Definition Description) pairs.</p>
<p>TypePlate offers several different patterns for definition lists. In all three of the examples below, the contents of dts are wrapped in b tags, and a class of .micro is given to the contents of dds. First is the default format for definitions lists.</p>
<h3 class="delta">a) Multi-line Definitions (default)</h3>
<figure class="example no-top-pad">
<dl>
<dt><b>This is a term</b></dt>
<dd>this is the definition of that term, which both live in a <code>dl</code>.</dd>
<dt><b>Another Term</b></dt>
<dd>And it gets a definition too, which is this line</dd>
<dd>This is a 2<sup>nd</sup> definition for a single term. A <code>dt</code> may be followed by multiple <code>dd</code>s.</dd>
</dl>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;/dd&gt;
&lt;/dl&gt;</code></pre>
</figure>
<h3 class="delta">b) Inline Definitions</h3>
<p>The second format for definition lists is lining. This style is more robust, with support for multiple terms defined by a single definition, and applies proper punctuation (: ,) where appropriate:</p>
<figure class="example no-top-pad">
<dl class="lining">
<dt><b>This is a term</b></dt>
<dd>this is the definition of that term, which both live in a <code>dl</code>.</dd>
<dt><b>Another Term</b></dt>
<dd class="micro">And it gets a definition too, which is this line</dd>
<dd class="micro"> this is a 2<sup>nd</sup> definition for a single term.</dd>
<dt><b>Term</b></dt>
<dt><b>Other Defined Term</b></dt>
<dd><code>dt</code> terms may stand on their own without an accompanying <code>dd</code>, but in that case they <em>share</em> descriptions with the next available <code>dt</code>. You may not have a <code>dd</code> without a parent <code>dt</code>.</dd>
</dl>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">&lt;dl class="lining"&gt;
&lt;dt&gt;&lt;b&gt;&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;/dd&gt;
&lt;/dl&gt;</code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">@mixin definition-list-style($style) {
// lining style
@if $style == lining {
dt, dd {
display: inline;
margin: 0;
}
dt, dd {
& + dt {
&:before {
content: "\A";
white-space: pre;
}
}
}
dd {
& + dd {
&:before {
content: ", ";
}
}
&:before {
content: ": ";
margin-left: -0.2rem; // removes extra space between the dt and the colon
}
}
}
}
dl {
@include definition-list-style(lining);
}</code></pre>
</figure>
<h3 class="delta">c) Dictionary-style Definition</h3>
<p>The third format for definition lists is dictionary. This style is more a formal, applying proper punctuation where necessary and includes ordinal indicators:</p>
<figure class="example no-top-pad">
<dl class="dictionary-style">
<dt><b>This is a term</b></dt>
<dd>this is the definition of that term, which both live in a <code>dl</code>.</dd>
<dt><b>Another Term</b></dt>
<dd>And it gets a definition too, which is this line</dd>
<dd> this is a 2<sup>nd</sup> definition for a single term.</dd>
<dt><b>Term</b></dt>
<dt><b>Other Defined Term</b></dt>
<dd><code>dt</code> terms may stand on their own without an accompanying <code>dd</code>, but in that case they <em>share</em> descriptions with the next available <code>dt</code>. You may not have a <code>dd</code> without a parent <code>dt</code>.</dd>
</dl>
</figure>
<figure class="typeplate-code-block">
<figcaption>HTML</figcaption>
<pre><code class="language-markup">&lt;dl class="dictionary-style"&gt;
&lt;dt&gt;&lt;b&gt;&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;b&gt;&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;/dd&gt;
&lt;dt&gt;&lt;b&gt;&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;/dd&gt;
&lt;/dl&gt;</code></pre>
</figure>
<figure class="typeplate-code-block">
<figcaption>Sass</figcaption>
<pre><code class="language-sass">@mixin definition-list-style($style) {
// dictionary-style
@if $style == dictionary-style {
dt {
display: inline;
counter-reset: definitions;
& + dt {
&:before {
content: ", ";
margin-left: -0.2rem; /* removes extra space between the dt and the comma */
}
}
}
dd {
display: block;
counter-increment: definitions;
&:before {
content: counter(definitions, decimal) ". ";
}
}
}
}
dl {
@include definition-list-style(dictionary-style);
}</code></pre>
</figure>
<a href="#table-of-contents">back to top</a>
</section>
<footer role="contentinfo" class="site-footer">
<p>Copyright &copy;2013. Typeplate is a <a href="https://twitter.com/gryghostvisuals">@gryghostvisuals</a> and <a href="https://twitter.com/zakkain">@zakkain</a> Joint<sup>&trade;</sup> Logo Crafting by <a href="https://twitter.com/TommyCreenan">@TommyCreenan</a>.</p>
</footer>
</div><!-- end last col-wrap -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="./js/vendor/jquery.min.js"><\/script>')</script>
<script src="./js/minified/main-min.js"></script>
<script>
var _gaq=[['_setAccount','UA-38761755-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.