accoutrement-scale
Sass size & scale management tools by OddBird. Gather all your sizes into a single map, generate new sizes based on modular scales or arbitrary functions, and access them by name.
More Accoutrement Tools
- Init provides light-weight browser-normalization.
- Color provides color-palette management and contrast-ratio utilities.
- Type provides webfont management tools, and other typography helpers.
- Layout provides layout utilities such as box-sizing, intrinsic ratios, z-index management, named media-queries, and a clearfix.
Quick Start
Install the package with npm or yarn:
npm install accoutrement-scaleyarn add accoutrement-scale
Import the library:
;
Establish your palette of ratios (modular scales) and sizes:
; ;
Access your named sizes using the size()
function,
and even convert-units on-the-fly:
.example
We can only calculate integer steps along an exponential modular scale, but if you want more power, install MathSass, and we'll let them do the hard math.
;