@avalanche/utility-offset

Offset classes.

Install

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

Basic usage

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

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

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

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-offset/scss/mixins';

// Usage.
.offset-6\/12 {
  @include u-offset(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