JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q51870F
  • License MIT

Spacing utility classes

Package Exports

  • @avalanche/utility-spacing

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@avalanche/utility-spacing) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@avalanche/utility-spacing

Spacing utility classes.

Install

npm install @avalanche/utility-spacing --save-dev

Basic usage

// Import the main file.
@import 'node_modules/@avalanche/utility-spacing/scss/index.scss';

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/utility-spacing';

// Import just the classes you need.
@import '{ .u-spacing-top-m, .u-spacing-top-l } from ~@avalanche/utility-spacing';

// Not a fan of the "u-" prefix?
@import '{ .u-spacing-top-m as .spacing-top-m } from ~@avalanche/utility-spacing';

Demo

<div class="u-spacing-top-m">Top m</div>
<div class="u-spacing-top-xl">Top xl</div>
<div class="u-spacing-right-m">Right m</div>
<div class="u-spacing-bottom-m">Bottom m</div>
<div class="u-spacing-left-m">Left m</div>

Mixins

@import 'node_modules/@avalanche/utility-spacing/scss/mixins';

// Usage.
.spacing-top {
  @include u-spacing(1em, top);
}

About

Author

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

License

MIT