Skip to content

Commit 78cf43f

Browse files
committed
Document .font() and .font-align() better.
1 parent a83b966 commit 78cf43f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ main {
268268

269269
##### Usage
270270

271+
Provided we define the document baseline as follows:
272+
271273
```less
272274
@helvetica-font-family: 'Helvetica', sans-serif;
273275
@helvetica-font-variation: italic 400;
@@ -280,6 +282,7 @@ main {
280282
.use-baseline-grid(16px, 1.5, verdana);
281283
```
282284

285+
...we can set the font properties like this:
283286

284287
```less
285288
h1 {
@@ -290,6 +293,22 @@ h1 + p {
290293
}
291294
```
292295

296+
...which, once compiled, looks like this...
297+
298+
```css
299+
h1 {
300+
position: relative;
301+
top: -10.732px;
302+
top: -0.67075rem;
303+
font: italic 400 30px / 1.25 'Helvetica', sans-serif;
304+
font-size: 1.875rem;
305+
}
306+
h1 + p {
307+
font: normal 400 20px / 1.45 'Verdana', sans-serif;
308+
font-size: 1.25rem;
309+
}
310+
```
311+
293312
#### `.height()`, `.min-height()`, `.max-height()`, `.top()`, `.bottom()`, `.margin-top()`, `.margin-bottom()`, `.padding-top()`, `.padding-bottom()`
294313

295314
These mixins let you set the respective CSS property in baseline rows.

0 commit comments

Comments
 (0)