From 63991f75e6ab6e272f3d3592dd9022a5fd51ec64 Mon Sep 17 00:00:00 2001 From: 1000ch Date: Thu, 10 Mar 2016 17:59:18 +0900 Subject: [PATCH] Tweaks --- index.html | 2 +- package.json | 3 ++- readme.markdown | 37 ++++++++++++++++++++++++++++++++++++- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index a5e31bf..2acd10a 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ max-width: 960px; font-size: 1.6rem; } - .Grid > div { + .Grid > .Cell { padding: 1rem; border: 1px dashed #ccc; } diff --git a/package.json b/package.json index 57f0a75..fab1e68 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ }, "keywords": [ "css", - "grid" + "grid", + "flexbox" ], "repository": "1000ch/grd", "author": { diff --git a/readme.markdown b/readme.markdown index c5117e8..b244f5e 100644 --- a/readme.markdown +++ b/readme.markdown @@ -2,9 +2,15 @@ A CSS grid framework using Flexbox. +## Installation + +```bash +$ npm install grd +``` + ## Usage -Grd provides 2 classes as base, `.Grid` and `.Cell`. +Grd provides 2 classes as base, `Grid` and `Cell`. ```html
@@ -12,3 +18,32 @@ Grd provides 2 classes as base, `.Grid` and `.Cell`.
9of12
``` + +### `Grid` modifiers + +- `--top`: Align items to top +- `--middle`: Align items to middle +- `--bottom`: Align items to bottom +- `--left`: Layout items to left +- `--center`: Layout items to center +- `--right`: Layout items to right + +### `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