accoutrement-scale
Advanced tools
Comparing version 2.0.0 to 3.0.0-alpha.1
{ | ||
"name": "accoutrement-scale", | ||
"version": "2.0.0", | ||
"version": "3.0.0-alpha.1", | ||
"description": "Size and scale helpers for typography and layout.", | ||
@@ -17,5 +17,5 @@ "homepage": "https://github.com/oddbird/accoutrement-scale", | ||
"mocha": "^2.4.5", | ||
"sass-true": "^2.0.3", | ||
"sassdoc": "^2.1.20", | ||
"sassdoc-theme-herman": "^0.2.1" | ||
"sass-true": "^2.2.1", | ||
"sassdoc": "^2.2.0", | ||
"sassdoc-theme-herman": "^0.5.5" | ||
}, | ||
@@ -22,0 +22,0 @@ "author": "Miriam Suzanne <miriam@oddbird.net>", |
@@ -26,9 +26,56 @@ accoutrement-scale | ||
```scss | ||
@import 'path/to/accoutrement-scale/scale' | ||
@import 'path/to/accoutrement-scale/sass/scale' | ||
``` | ||
Configure your ratios and sizes: | ||
Establish your palette of ratios and sizes: | ||
```scss | ||
$ratios: ( | ||
'my-ratio': 1.25, | ||
); | ||
$sizes: ( | ||
'root': 24px, | ||
'rhythm': 'root' ('fifth': 1, 'convert-units': 'rem'), | ||
'h1': 'root' ('my-ratio': 3), | ||
'h2': 'root' ('my-ratio': 2), | ||
'h3': 'root' ('my-ratio': 1), | ||
'page': '8in', | ||
); | ||
``` | ||
Results will be returned in the units they were defined, | ||
but can be converted in the map settings (as above), | ||
or on-the-fly using `size`: | ||
```scss | ||
.example { | ||
// size('page') would return `8in`... | ||
width: size('page', 'px'); | ||
} | ||
``` | ||
Access your sizes from anywhere, | ||
with helpers for setting font-sizes and line-heights: | ||
```scss | ||
h1 { | ||
@include font-size('h1'); | ||
max-width: size('page'); | ||
} | ||
``` | ||
We can only calculate integer steps along an exponential scale, | ||
but if you want more power, | ||
install [MathSass][mathsass], | ||
and we'll let them do the hard math. | ||
```scss | ||
$sizes: ( | ||
'complex': 'root' ('my-scale': 1.25), | ||
); | ||
``` | ||
[mathsass]: https://github.com/terkel/mathsass |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
32913
24
81
1