Skip to content
One grid system to rule them all (.scss)
CSS JavaScript HTML
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.resources
demo release 4.0.0-beta.2 Apr 8, 2019
doc release 4.0.0-beta.2 Apr 8, 2019
src/sass release 4.0.0-beta.2 Apr 8, 2019
.babelrc init release 3.0.0 Jan 18, 2017
.editorconfig init release 3.0.0 Jan 18, 2017
.gitignore clean repository Jan 27, 2017
.node-version clean repository Jan 27, 2017
CHANGELOG.md make some updates May 31, 2017
CNAME
LICENSE.txt adding license Oct 12, 2015
README.md release 4.0.0-beta.2 Apr 8, 2019
_gridle.scss merge gridlev4 repo Apr 7, 2019
_index.scss merge gridlev4 repo Apr 7, 2019
carpenter.displays.js release 4.0.0-beta.2 Apr 8, 2019
favicon.ico merge gridlev4 repo Apr 7, 2019
index.html merge gridlev4 repo Apr 7, 2019
index.js merge gridlev4 repo Apr 7, 2019
package-lock.json release 4.0.0-beta.2 Apr 8, 2019
package.json pass to version 4.0.0 May 13, 2019
webpack.config.js prepare 3.0.0-rc.1 realease May 31, 2017
yarn.lock

README.md

Gridle

Coffeekraken 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
  8. Browsers Support
  9. Contribute
  10. Who are Coffeekraken
  11. License

Install

Gridle is available through NPM. To install it, just launch this command line:

npm install coffeekraken-gridle@4.0.0-beta.2 --save

Quick start

Importing gridle

import 'node_modules/coffeekraken-gridle/index';

Configure your grid :

@include g-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 g-register-state(tablet, (
	min-width : 640px
));
@include g-register-state(desktop, (
	min-width : 992px
));

// even with full custom queries :
@include g-register-state (landscape, (
	query : "(orientation : landscape)"
));

Generate all classes :

@include g-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 g-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 g-custom-class('center') {
	text-align : center;
}

This will produce the classes : center, center@tablet, center@desktop and center@landscape automatically

Browsers support

IE / Edge
Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Edge16+ last 2 versions last 2 versions last 2 versions

As browsers are automatically updated, we will keep as reference the last two versions of each but this package can work on older ones as well.

Contribute

This is an open source project and will ever be! You are more that welcomed to contribute to his development and make it more awesome every day. To do so, you have several possibilities:

  1. Share the love ❤️
  2. Declare issues
  3. Fix issues
  4. Add features
  5. Build web component

Who are Coffeekraken

We try to be some cool guys that build some cool tools to make our (and yours hopefully) every day life better.

More on who we are

License

The code is available under the MIT license. This mean that you can use, modify, or do whatever you want with it. This mean also that it is shipped to you for free, so don't be a hater and if you find some issues, etc... feel free to contribute instead of sharing your frustrations on social networks like an asshole...

You can’t perform that action at this time.