Giter Site home page Giter Site logo

ridjohansen / grd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 1000ch/grd

0.0 2.0 0.0 38 KB

A CSS grid framework using Flexbox. Only 512 bytes (Gzipped).

Home Page: https://1000ch.github.io/grd

License: MIT License

HTML 83.95% CSS 16.05%

grd's Introduction

Grd

A CSS grid framework using Flexbox.

  • Simple: Provides just 2 base classes Grid and Cell and some modifiers.
  • Light-weight: Only 512 bytes (Gzipped).
  • Flexible: Easy to use Flexbox features.

Flexible Box Layout Module and calc() as CSS unit value used in Grd are available on modern browsers (Chrome, Firefox, Safari, Opera, Edge and IE11).

Installation

# via npm
$ npm install grd

# via bower
$ bower install grd

Usage

<div class="Grid">
  <div class="Cell -3of12">3of12</div>
  <div class="Cell -9of12">9of12</div>
</div>

Grid modifiers

  • To align items with align-items
    • -top: To top
    • -middle: To middle
    • -bottom: To bottom
    • -stretch: Stretch items
    • -baseline: To baseline
  • To layout contents with justify-content
    • -left: To left
    • -center: To center
    • -right: To right
    • -between: Add spaces between items
    • -around: Add spaces around items

Cell modifiers

  • -fill: Set item width to left width of parent
  • -1of12: Set item width to 8.3% of parent
  • -2of12: Set item width to 16.7% of parent
  • -3of12: Set item width to 25% of parent
  • -4of12: Set item width to 33% of parent
  • -5of12: Set item width to 41.7% of parent
  • -6of12: Set item width to 50% of parent
  • -7of12: Set item width to 58.3% of parent
  • -8of12: Set item width to 66.7% of parent
  • -9of12: Set item width to 75% of parent
  • -10of12: Set item width to 83.3% of parent
  • -11of12: Set item width to 91.7% of parent
  • -12of12: Set item width to 100% of parent

License

MIT: http://1000ch.mit-license.org

grd's People

Watchers

James Cloos avatar Richard Duchatsch Johansen 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.