You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-16Lines changed: 11 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,8 @@ npm install order.less
28
28
29
29
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.
30
30
31
+
### Example
32
+
31
33
Here is an example of a basic layout implemented using this module (see [source code](examples/002_Columns/)):
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.
146
148
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/)):
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>.
148
159
149
160
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:
175
186
176
187
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.
177
188
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/)):
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.
0 commit comments