Skip to content

Commit b6cc0cb

Browse files
committed
Wrap up documentation.
1 parent 91fa6e2 commit b6cc0cb

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

README.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ npm install order.less
2828

2929
Column grid mixins let you define a uniform grid with fixed inner gutters, and set elements' padding, margin, offset and width in columns. At the moment, only uniform grids with inner gutters are supported, e.g. a 3-column grid will have 2 gutters between 3 columns of equal width.
3030

31+
### Example
32+
3133
Here is an example of a basic layout implemented using this module (see [source code](examples/002_Columns/)):
3234

3335
<a href="examples/002_Columns/"><img src="examples/002_Columns/index.png" alt=""></a>
@@ -144,6 +146,15 @@ div {
144146

145147
These mixins let you control vertical rhythm of the document by setting padding, margin, offset and height in baseline rows. It can also automatically shift elements to sit on baseline, if their font size, line height and/or font family is changed.
146148

149+
### Example
150+
151+
Three typefaces are used in the example below with vertical rhythm and baseline alignment preserved (see [source code](examples/003_Baselines/)):
152+
153+
154+
<a href="examples/003_Baselines/"><img src="examples/003_Baselines/index.png" alt=""></a>
155+
156+
### A bit of theory
157+
147158
Baseline row height is a product of base `font-size` and base `line-height` of the document. For example, if the base `font-size` equals <samp>20px</samp> and base `line-height` equals <samp>1.5</samp>, then baseline row height is <samp>30px</samp>.
148159

149160
Whenever you change any of font property of a block element, its baseline drifts off the parent baseline. In order to preserve baseline alignment you could manually adjust relative position of the element:
@@ -175,17 +186,6 @@ Here are baseline offset values for a few popular typefaces:
175186

176187
You can find offset values for many other typefaces (and their variations) including popular Google fonts in [HTML source](tests/index.html) of the test suite.
177188

178-
<!--
179-
### Examples
180-
181-
TODO: EXAMPLE: Horizontal alignment of side by side elements: p, aside > p
182-
TODO: EXAMPLE: Vertical rhythm: h1 + .intro, h2, p with borders, paddings and margins, and 2 fonts.
183-
-->
184-
185-
Three typefaces are used in the example, while vertical rhythm and baseline alignment is preserved (see [source code](examples/003_Baselines/)):
186-
187-
<a href="examples/003_Baselines/"><img src="examples/003_Baselines/index.png" alt=""></a>
188-
189189

190190
### Mixin reference
191191

@@ -351,11 +351,6 @@ div {
351351

352352
Modular scale mixins let you define a custom modular scale and set elements' font size to a value from that scale. You can learn more about modular scales in [More Meaningful Typography](http://alistapart.com/article/more-meaningful-typography) by Tim Brown.
353353

354-
<!--
355-
### Examples
356-
357-
TODO: EXAMPLE: A modular scale and draw AAAAAA
358-
-->
359354

360355
### Mixin reference
361356

0 commit comments

Comments
 (0)