• Stars
    star
    367
  • Rank 116,257 (Top 3 %)
  • Language
    CSS
  • License
    MIT License
  • Created over 12 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A CSS grid constructor

Griddle

unmaintained

Griddle is a CSS grid system for modern browsers. It is generated from a set of Sass functions and mixins. The grid uses inline-block and box-sizing to provide features that float-based layouts cannot.

Project page

Contribution guidelines

Installation

  • Download: zip
  • Bower: bower install --save griddle
  • Git: git clone https://github.com/necolas/griddle.git

Features

  • Fluid layout.
  • Intelligent cell wrapping.
  • Horizontal centering of cells.
  • Custom vertical alignment of cells (top, bottom, or middle).
  • Cell width is controlled independently of grid gutter.
  • Infinite nesting.
  • Built-in redundancy coupled with automatic consolidation of rules in compiled CSS.
  • Modify the grid at different breakpoints for responsive layouts.
  • RTL support.

How to use it

The grid system is suitable whether or not you choose to develop "mobile first". Import griddle to "initialize" the grid at a given breakpoint.

The griddle-build() mixin handles the generation of styles for grids. It can accept a space-separated list of integers, each of which results in the creation of a grid with that many parts. For example:

@import "griddle";
// Create 2, 3, and 4 column grids
@include griddle-build(2 3 4);

The mixin also accepts a string as a second (optional) argument. This can be used to generate modified selectors to override the width of a cell at different breakpoints. For example:

@media (min-width: 40em) {
    // Create 2, 3, 4, 5, 6, and 12 column grids (wider screens)
    @include griddle-build(2 3 4 5 6 12, '--desktop');
}

Each grid cell is created in the same way, using HTML classes. You can have a cell that is 50% wide at narrow viewports, but 25% wide at wider viewports when the styles are applied to the modifier class:

<div class="grid__cell unit-1-2 unit-1-4--desktop">
    ...
</div>

Feel free to customize the default class name pattern to suit your personal preferences.

Browser support

  • Google Chrome
  • Firefox
  • Safari
  • Opera
  • Internet Explorer 8+

License

MIT License

More Repositories

1

normalize.css

A modern alternative to CSS resets
CSS
52,285
star
2

react-native-web

Cross-platform React UI packages
JavaScript
21,553
star
3

idiomatic-css

Principles of writing consistent, idiomatic CSS.
6,641
star
4

dotfiles

OS X dotfiles: bash, git, vim, etc.
Shell
785
star
5

css3-facebook-buttons

Simple CSS to recreate the appearance of Facebook's buttons and toolbars.
CSS
577
star
6

idiomatic-html

Principles of writing consistent, idiomatic HTML.
525
star
7

css3-social-signin-buttons

CSS3 Social Sign-in Buttons with icons. Small and large sizes.
CSS
475
star
8

issue-guidelines

A set of guidelines for submitting issues and pull requests on projects
426
star
9

styleq

styleQ is a quick, small JavaScript runtime for merging the HTML class names produced by CSS compilers.
JavaScript
185
star
10

icon-builder-example

JavaScript
148
star
11

xdm.js

JSON-RPC 2.0 cross-domain communication over postMessage
JavaScript
89
star
12

emitter.js

A simple JavaScript event-emitter
JavaScript
85
star
13

jekyll-boilerplate

A jekyll starting point.
HTML
73
star
14

generator-jsmodule

A Yeoman generator to scaffold out a simple JS module for Node.js or the browser
JavaScript
68
star
15

chrome-tab-limit

Chrome browser extension that limits you to 20 open tabs
JavaScript
53
star
16

suit-grid-layouts

DEPRECATED
HTML
45
star
17

delegate.js

DOM event delegation component
JavaScript
45
star
18

project-euler

JavaScript solutions to the Project Euler problems.
JavaScript
44
star
19

custom-tweet-button-for-wordpress

A fully customisable HTML and CSS Tweet Button for Wordpress. Built using PHP; no JavaScript requirement. Uses the bit.ly and Twitter APIs.
PHP
36
star
20

dom-shims

Complete and well-tested shims / polyfills for various DOM API's missing in not-so-modern browsers
JavaScript
34
star
21

eraser.css

CSS `!important`-fueled bulldozer
CSS
29
star
22

newsriver-ui

User interface for displaying a river of news generated by Dave Winer's River2 software.
JavaScript
27
star
23

dom-closest

For a given DOM element, find the first ancestor that matches a given CSS selector.
JavaScript
22
star
24

event-shim.js

A W3C DOM Event API shim for IE 8
JavaScript
20
star
25

dom-matches

Check if a DOM element matches a given selector.
JavaScript
19
star
26

dom-insert-html

HTML-string DOM insertion methods using 'insertAdjacentHTML'
JavaScript
13
star
27

matches.js

DEPRECATED
JavaScript
12
star
28

dom-siblings

Find a DOM element's siblings, optionally filtered by a CSS selector.
JavaScript
11
star
29

dom-insert

DOM insertion methods.
JavaScript
10
star
30

dom-responder-events

4
star
31

flight-mustache

A Flight component for rendering Mustache templates with mustache.js
JavaScript
2
star
32

webpack-bugs

JavaScript
1
star