PostCSS plugin that makes available a typographic scale in font-size declarations.
Built for Concise CSS.
Write this:
And get this:
Installation
$ npm install postcss-type-scale
Usage
postcss([ require('postcss-type-scale') ])
See PostCSS docs for examples for your environment.
Options
rootSelector
- Type:
string
- Default:
:root
The selector where the type scale is defined. You can use html
or body
. It will use :root
by default.
typeRatio
- Type:
number
- Default:
1.2
The default ratio to be used. Used only when a ratio definition in the root element is not found.
ratioProperty
- Type:
string
- Default:
--type-ratio
Name of the custom property that contains the ratio.
License
MIT - James Kolce