0.0.1 • Published 5 years ago

wilhelm v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

Installation

Wilhelm is available via npm or yarn.

npm install wilhelm
# or
yarn add wilhelm

After installing, simply reference Wilhelm in your scss file.

@import '_wilhelm.scss';

Using Wilhelm

Up to now these mixins are available:

NameDescription
wilhelm-grid()This turns the current element to a basic CSS Grid container.
wilhelm-grid-item()wilhelm-grid-item turns the current element into a Grid item. It has to be places within wilhelm-grid.
wilhelm-flex()This turns the current element into a basic CSS Flexbox container.
wilhelm-flex-item()wilhelm-flex-item turns the current element into a Grid item. It has to be places within wilhelm-flex.

To include a Wilhelm mixin, simply use

.element {
    @include wilhelm-grid;
}

Options & Defaults

If no configuration is given when using a Wilhelm mixin, the default is used. If you pass configuration, this configuration will override the specific part of the default. To ensure that the overall styling still works, the rest of the default configuration will remain intact and will be used.

wilhelm-grid

PropertyValue
displaygrid
grid-column-gap0
grid-row-gap0
justify-contentstretch
grid-auto-rows1fr

wilhelm-grid-item

PropertyValue
justify-itemsstretch
align-selfstretch
grid-auto-columns1fr

wilhelm-flex

PropertyValue
displayflex
flex-directionrow
flex-wrapnowrap
justify-contentflex-start
align-itemsstretch
align-contentstretch

wilhelm-flex-item

PropertyValue
order0
flex-grow0
flex-shrink1
flex-basisauto
align-selfstretch

Passing options

You can pass any valid option you like.

.element {
    @include wilhelm-grid-item( $grid-row-gap: 20px );
}

.another-element {
    @include wilhelm-grid-item( $justify-self: "end" );
}