This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@coffeekraken/gridle

0.0.6 • Public • Published

Gridle

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

  1. Install
  2. Get started
  3. Settings
  4. States
  5. Classes
  6. Functions
  7. Mixins

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...

Coffeekraken

Package Sidebar

Install

npm i @coffeekraken/gridle

Weekly Downloads

0

Version

0.0.6

License

MIT

Unpacked Size

183 kB

Total Files

23

Last publish

Collaborators

  • olivierbossel