@avalanche/utility-order

Reorder flex items.

Install

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

Basic usage

// Import the main file.
@import 'node_modules/@avalanche/utility-order/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-order';

// Import just the classes you need.
@import '{ .u-order-1\@m, .u-order-last\@m } from ~@avalanche/utility-order';

// Not a fan of the "u-" prefix?
@import '{ .u-order-1\@m as .order-1\@m, .u-order-last\@m as .order-last\@m } from ~@avalanche/utility-order';

Demo

last
10
9
8
7
6
5
4
3
2
1
first
```html
last
10
9
8
7
6
5
4
3
2
1
first
```

Mixins

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

// Usage.
.order-5 {
  @include u-order(5);
}

.order-first {
  @include u-order-first();
}

.order-last {
  @include u-order-last();
}

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