aleut.tools.widths

1.0.1 • Public • Published

Widths

aleutcss’ widths tooling allows you to generate a suite of utility classes for sizing pieces of UI responsively.

Install using npm:

    $ npm install --save-dev aleut.tools.widths
 

Usage

Basic usage of the functions in a SCSS-file:

@include inuit-widths(3);

This will generate a series of classes in the format .u-1/3 to be used for sizing:

.u-1\/3 {
  width: 33.33333333% !important;
}
 
.u-2\/3 {
  width: 66.66666667% !important;
}
 

Pass in the columns we want the widths to have, and an optional suffix for responsive widths. E.g. to create thirds and quarters for a small breakpoint:

@include widths(3 4, -sm);

This will yield:

.u-1\/3-sm {
    width: 33.33333333% !important;
}
 
.u-2\/3-sm {
    width: 66.66666667% !important;
}
 
.u-1\/4-sm {
    width: 25% !important;
}
 
.u-2\/4-sm {
    width: 50% !important;
}
 
.u-3\/4-sm {
    width: 75% !important;
}

Readme

Keywords

Package Sidebar

Install

npm i aleut.tools.widths

Weekly Downloads

0

Version

1.0.1

License

Apache-2.0

Last publish

Collaborators

  • hauken
  • kmelve
  • robrobro