@avalanche/setting-spacings

Spacing sizes.

Install

npm install @avalanche/setting-spacings --save-dev

Basic usage

// Import the main file.
@import 'node_modules/@avalanche/setting-spacings/scss/index.scss';

// Import just the settings file.
@import 'node_modules/@avalanche/setting-spacings/scss/settings';

Usage with node-sass-magic-importer

Using node-sass (or a plugin for Grunt, gulp or webpack which is using node-sass) in combination with the node-sass-magic-importer custom importer, can make importing CSS dependencies from node_modules a much nicer experience.

// Import the main file.
@import '~@avalanche/setting-spacings';

Usage

// Function.
.selector {
  margin-top: setting-spacing(m);
}

// Map.
.selector {
  margin-top: map-get($spacings, m);
}

Settings

/// Spacing sizes.
/// @type Map
$spacings: (
  xs: 0.5em,
  s: 0.75em,
  m: 1em,
  l: 1.5em,
  xl: 2em,
  xxl: 3.5em,
  xxxl: 6em,
) !default;

About

Author

Markus Oberlehner
Website: https://markus.oberlehner.net
Twitter: https://twitter.com/MaOberlehner
PayPal.me: https://paypal.me/maoberlehner

License

MIT

Do you want to support avalanche?

Star the project on GitHub