@avalanche/utility-width

Width classes.

Install

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

Basic usage

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

// Import just the classes you need.
@import '{ .u-width-12\/12, .u-width-4\/12\@m } from ~@avalanche/utility-width';

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

Demo

1
2
3
4
5
6
7
8
9
10
11
12
```html
1
2
3
4
5
6
7
8
9
10
11
12
```
1
2
3
4
5
6
7
8
9
10
11
12
```html
1
2
3
4
5
6
7
8
9
10
11
12
```

Mixins

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

// Usage.
.width-6\/12 {
  @include u-width(6, 12);
}

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