New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

accoutrement-scale

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

accoutrement-scale - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0-alpha.1

CHANGELOG.md

8

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc