-
Notifications
You must be signed in to change notification settings - Fork 677
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
202 additions
and
40 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import React from 'react' | ||
|
||
import withDocLayout from '../../../ui/withDocLayout' | ||
import Scale from '../../../typography/scale.md' | ||
|
||
export default withDocLayout(Scale) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { BigQuote } from '../ui' | ||
import ScaleHero from '../ui/ScaleHero' | ||
import FontSizes from '../ui/FontSizes' | ||
|
||
# Type Scale | ||
|
||
<ScaleHero /> | ||
|
||
<BigQuote | ||
quote='The simplest scale is a single note, and sticking with a single note draws more attention to other parameters, such as rhythm and inflection… In the sixteenth century, a series of common sizes developed among European typographers, and the series survived with little change and few additions for 400 years… This is the typographic equivalent of the diatonic scale.' | ||
author='Robert Bringhurst' | ||
work='The Elements of Typographic Style' | ||
/> | ||
|
||
### Font sizes | ||
|
||
<FontSizes /> | ||
|
||
## Examples | ||
|
||
```.html | ||
<h1 class="f-headline lh-solid measure">A modular scale, like a musical scale, is a prearranged set of harmonious proportions.</h1> | ||
``` | ||
|
||
```.html | ||
<h1 class="f-subheadline lh-title measure">A modular scale, like a musical scale, is a prearranged set of harmonious proportions.</h1> | ||
``` | ||
|
||
```.html | ||
<h1 class="f1 lh-title measure">A modular scale, like a musical scale, is a prearranged set of harmonious proportions.</h1> | ||
``` | ||
|
||
```.html | ||
<h1 class="f2 normal lh-title measure">A modular scale, like a musical scale, is a prearranged set of harmonious proportions.</h1> | ||
``` | ||
|
||
```.html | ||
<h1 class="f3 normal lh-title measure">A modular scale, like a musical scale, is a prearranged set of harmonious proportions.</h1> | ||
``` | ||
|
||
```.html | ||
<h1 class="f4 normal lh-title measure">A modular scale, like a musical scale, is a prearranged set of harmonious proportions.</h1> | ||
``` | ||
|
||
```.html | ||
<h1 class="f5 normal lh-title measure">A modular scale, like a musical scale, is a prearranged set of harmonious proportions.</h1> | ||
``` | ||
|
||
```.html | ||
<h1 class="f6 normal lh-title measure">A modular scale, like a musical scale, is a prearranged set of harmonious proportions.</h1> | ||
``` | ||
|
||
```.html | ||
<h1 class="f7 normal lh-title measure">A modular scale, like a musical scale, is a prearranged set of harmonious proportions.</h1> | ||
``` | ||
|
||
## Reference | ||
|
||
- [MDN - Font size](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React from 'react' | ||
|
||
export default () => ( | ||
<div className="w-100 overflow-x-auto pb4"> | ||
<table> | ||
<tbody> | ||
<tr> | ||
<td className="tc f-headline b br b--black-10 v-base">A</td> | ||
<td className="tc ph2 br f-subheadline b br b--black-10 v-base">A</td> | ||
<td className="tc f1 b br b--black-10 v-base">A</td> | ||
<td className="tc f2 b br b--black-10 v-base">A</td> | ||
<td className="tc f3 b br b--black-10 v-base">A</td> | ||
<td className="tc f4 b br b--black-10 v-base">A</td> | ||
<td className="tc f5 b br b--black-10 v-base">A</td> | ||
<td className="tc f6 b b--black-10 v-base">A</td> | ||
</tr> | ||
<tr> | ||
<td className="tc gray f6 fw2 pr2 bt br b--black-10 pt1"> | ||
6rem (96px) | ||
</td> | ||
<td className="tc gray f6 fw2 ph2 bt br b--black-10 pt1"> | ||
5rem (80px) | ||
</td> | ||
<td className="tc gray f6 fw2 ph2 bt br b--black-10 pt1"> | ||
3rem (48px) | ||
</td> | ||
<td className="tc gray f6 fw2 ph2 bt br b--black-10 pt1"> | ||
2.25rem (36px) | ||
</td> | ||
<td className="tc gray f6 fw2 ph2 bt br b--black-10 pt1"> | ||
1.5rem (24px) | ||
</td> | ||
<td className="tc gray f6 fw2 ph2 bt br b--black-10 pt1"> | ||
1.25rem (20px) | ||
</td> | ||
<td className="tc gray f6 fw2 ph2 bt br b--black-10 pt1"> | ||
1rem (16px) | ||
</td> | ||
<td className="tc gray f6 fw2 pl2 bt b--black-10 pt1"> | ||
.875rem (14px) | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react' | ||
|
||
export default () => ( | ||
<article className="cf"> | ||
<div className="fl w-100 w-50-l pr4-l"> | ||
<div className="outline black-10 mt3-ns"> | ||
<div className="aspect-ratio aspect-ratio--8x5"> | ||
<iframe | ||
className="aspect-ratio--object" | ||
src="https://player.vimeo.com/video/183819916" | ||
frameBorder="0" | ||
allowFullScreen="" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="fl w-100 w-50-l pt4"> | ||
<p className="fl w-100 f5 f4-ns lh-copy mb3"> | ||
<span> | ||
Often times, websites devote a non-trivial amount of css to setting | ||
font-size | ||
</span>. They declare an unnecessary amount of different font-sizes that | ||
upon inspection, don’t come close to resembling a sane type scale. | ||
</p> | ||
<p className="fl w-100 w-50-ns v-top f5 f6-ns lh-copy pr2-ns"> | ||
To create and design an easily readable interface, you don’t need more | ||
than 40 font-sizes. A simple ratio-based scale with 8 options should | ||
suffice. Using the class extension namespaces you can set the font-size | ||
for any particular breakpoint that you desire. | ||
</p> | ||
<p className="fl w-100 w-50-ns measure measure-narrow-ns v-top f5 f6-ns lh-copy pl2-ns"> | ||
Don’t spend time constantly overriding font-sizes in your css. If you | ||
don’t like a default font-size for an element, use the utilities to | ||
quickly make the text larger or smaller until it looks just right. | ||
</p> | ||
</div> | ||
</article> | ||
) |
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
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