Coder Social home page Coder Social logo

gr1d's Introduction

Gr1d

npm install gr1d

A little in-browser utility to quickly scaffold out Gr8.css grids.

Setup

var Gr1d = require('gr1d')

var grid = Gr1d({
  container: document.body,
  pad: 1,
  gutter: true,
  responsive: true,
})

Options

Container

The element rows and columns will be appended to. Defaults to document.body.

Pad

Padding amount of the columns and row. Defaults to 1

Gutter

Offsets the container to align the contents of the left and right columns regardless of padding amount. Defaults to true.

Responsive

Collapse all columns to full width of the container when hitting the sm breakpoint. Defaults to true.

Methods

Add

Takes either a series of arguments, or an object of options. The arguments for the shorthand are:

grid.add(columns, padding, gutter, responsive)

For example, add 3 evenly sized columns, padding of 1, enable the gutter offset and do not respond for mobile:

grid.add(3, 1, true, false)

Alternatively, you can pass an array of column sizes to the first argument.

grid.add([2, 6, 4], 2)

Example of an options object:

grid.add({
  col: 4,
  pad: 2,
  gutter: false,
  responsive: true
})

gr1d's People

Contributors

jondashkyle avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.