CSSensible
CSSensible finds sensible default values for font-size
and line-height
by identifying available vertical grids.
Installation
You can install through a gem.
$ gem install cssensible
Usage
You can find sensible vertical grids for one or several font-sizes.
$ cssensible [options] font-size [font-size font-size ...]
Options:
-l, --line-height [EM] Minimum em-value all line-heights should have
-h, --help Shop help
--version Show version
Examples
# finds sensible grids including a font-size of 12px
$ cssensible 12
# finds sensible grids including both 12px and 16px
$ cssensible 12 16
# finds sensible grids including 12px, 15px and 16px where the resulting
# line-height for every font-size is at least 1.3em
$ cssensible --line-height 1.3 12 15 16
line-height: 12px (9 font-sizes)
font-size (px) | line-height (px) | line-height (em)
------------------+--------------------+--------------------
10 | 18 | 1.8
12* | 18 | 1.5
15* | 24 | 1.6
16* | 24 | 1.5
20 | 30 | 1.5
24 | 36 | 1.5
25 | 36 | 1.44
28 | 42 | 1.5
30 | 42 | 1.4
Problems?
Please open an issue.
Author
- Dominik Habersack / [email protected]
License
CSSensible is released under the MIT License.