@coffeekraken/gridle v0.0.6
Gridle
Gridle is a simple but powerful and convenient grid that make use of the CSS grid model. It has been rewritten from the ground up to be more simple to use without loosing his principle goals that are the flexibility and his responsive capabilities.
Table of content
Install
Gridle is available through NPM. To install it, just launch this command line:
npm i @coffeekraken/gridle --save
Quick start
Importing gridle
@use 'node_modules/@coffeekraken/gridle/index' as gridle;
Configure your grid :
@include gridle.setup((
columns: 12,
column-width: 60, // unitless value
width: 1200, // unitless value
container-width: 85vw, // absolute value
container-max-width: 1440px
));
Register states (media queries) (optional) :
@include gridle.register-state(tablet, (
min-width : 640px
));
@include gridle.register-state(desktop, (
min-width : 992px
));
// even with full custom queries :
@include gridle.register-state (landscape, (
query : "(orientation : landscape)"
));
Generate all classes :
@include gridle.classes();
Use your grid in html :
<div class="gr">
<div class="col col--12 hide@tablet">
Header
</div>
<div class="col col--12 col--4@tablet">
Content
</div>
<div class="col col--12 col--4@tablet">
Sidebar
</div>
</div>
Customize your content look and feel with Gridle mixins
#sidebar {
background : red;
@include gridle.state(tablet) {
background : green;
}
}
Generate custom classes
Gridle allows you to generate custom classes that will be available for each of your states. Here's an exemple
@include gridle.custom-class('center') {
text-align : center;
}
This will produce the classes : center, center@tablet, center@desktop and center@landscape automatically
Coffeekraken
We are a young collective of front-end creative developers with one goal in mind. Build tools to make every team working day life better. This is our first and only concern. All our tools are build around that purpose. All what we provide are some cool tools that you can use the way you want. These tools features cover a large scope of the front-end workflow (styleguide generation, colors/fonts management, etc...). You can use only the parts that you need and let the rest aside...