postcss-typescale
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -53,2 +53,3 @@ 'use strict'; | ||
} | ||
if (values[0]) { | ||
@@ -55,0 +56,0 @@ options.tmp.index = values[0]; |
{ | ||
"name": "postcss-typescale", | ||
"version": "0.1.1", | ||
"description": "A PostCSS plugin to create a typographic scale.", | ||
"version": "0.1.2", | ||
"description": "A PostCSS plugin to set type based on a typographic scale.", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "postcss", |
@@ -7,3 +7,3 @@ # postcss-typescale | ||
A [PostCSS] plugin to set type. | ||
A [PostCSS] plugin to set type based on a [typographic scale](http://type-scale.com). | ||
@@ -44,5 +44,5 @@ [github.io]: http://francoisromain.github.io/postcss-typescale | ||
@typescale ([name]) { | ||
scale: 1.25; /* See type-scale.com to choose a scale */ | ||
font-size: 1rem; /* default font size */ | ||
line-height: 1.5rem; /* If no unit is provided, line-height is relative to font-size */ | ||
scale: 1.25; /* Typographic scale */ | ||
font-size: 1rem; /* Default font size */ | ||
line-height: 1.5rem; /* Baseline grid */ | ||
} | ||
@@ -53,2 +53,4 @@ ``` | ||
The line-height can be relative to the font-size if _line-height_ is set to 1 without unit. | ||
* * * | ||
@@ -64,14 +66,20 @@ | ||
#### Examples | ||
* * * | ||
## Examples | ||
```css | ||
.my-title { | ||
.title { | ||
typescale: 3 1.5; | ||
} | ||
.my-small-text { | ||
.text { | ||
typescale: 0; | ||
} | ||
.small-text { | ||
typescale: -1; | ||
} | ||
.my-extra-small-text { | ||
.extra-small-text { | ||
typescale: -2 0.5; | ||
@@ -81,3 +89,16 @@ } | ||
[input](https://github.com/francoisromain/postcss-typescale/blob/gh-pages/test/src/01.css), [output](https://github.com/francoisromain/postcss-typescale/blob/gh-pages/test/dist/01.css), [markup](https://github.com/francoisromain/postcss-typescale/blob/gh-pages/test/01.html), [demo](http://localhost/francoisromain.github.io/postcss-typescale/test/01.html) | ||
``` css | ||
@typescale my-scale { | ||
scale: 1.25; | ||
font-size: 1rem; | ||
line-height: 1.5rem; | ||
} | ||
.my-small-text { | ||
typescale: my-scale -2 0.5; | ||
} | ||
``` | ||
01: [input](https://github.com/francoisromain/postcss-typescale/blob/gh-pages/test/src/01.css), [output](https://github.com/francoisromain/postcss-typescale/blob/gh-pages/test/dist/01.css), [markup](https://github.com/francoisromain/postcss-typescale/blob/gh-pages/test/01.html), [demo](http://localhost/francoisromain.github.io/postcss-typescale/test/01.html) | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100
8333
8
69