2.2.0 • Published 2 years ago

snack-helper v2.2.0

Weekly downloads
19
License
MIT
Repository
github
Last release
2 years ago

Snack-helper

npm license Gitter

Snack-helper is a universal CSS helper library.

Installation

$ npm install snack-helper --save

Usage

@use 'snack-helper';

The @use-based Sass API is only available in the version 2.2.0 or above.

Customization

Some helpers can be customized with variables. Take the spacing for example.

Here is the default spacing variable.

$spacer: 1rem !default;
$spacers: (
  0: 0,
  4: $spacer * .25,
  8: $spacer * .5,
  12: $spacer * .75,
  16: $spacer,
  24: $spacer * 1.5,
  32: $spacer * 2,
  48: $spacer * 3
) !default;

You can cover the whole original spacing with $spacers as you like.

@use 'snack-helper' with (
  $spacers: (
    0: 0,
    1: .25rem,
    2: .5rem,
    3: .75rem,
    4: 1rem,
    5: 1.5rem
  )
);

If you just want to extend the original spacing, you can use the $spacers-extend;

@use '~snack-helper' with (
  $spacers-extend: (
    5: 5px,
    10: 10px,
    15: 15px
  )
);

Overview

License

MIT License

2.2.0

2 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago