2.0.1 • Published 6 years ago

banana-grid v2.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

banana-grid

QuickStart

Ease way

Just put this in the head of your html:

<head>
	<link rel="stylesheet" href="https://unpkg.com/banana-grid@1.4.7/dist/banana-grid.min.css" />
	<script type="text/javascript" src="https://unpkg.com/banana-grid@1.4.7/dist/main.min.js"></script>
</head>

Better way

Step 1: Install with NPM

$ npm install --save banana-grid

Step 2: Import the javascript

import "banana-grid";

Step 3: import SCSS

@import "~/banana-grid/grid.scss";

Helpers

cols and rows

screen breakpoints helpers

--x--xx--xxx
unitsmartphonesmall tablettablet / small desktopdesktop
pixel05769601152
8px grid072120144
96px grid061012

usage:

screen helper in size

<section class="cols">
    <div class="gw-2 gw-3--xxx"> </div>
</section>

The DIV above will have a width of 192 px in smartphones, tablets and small desktops (screens smaller than 1152 px) and a width of 480 px in desktops (screens equal or bigger than 1152 px)

screen helper in align

<section class="cols">
	<div class="gw-1 left right--xx ">
</section>

The DIV above will align on the left in smartphones, tablets and small desktops (screens smaller than 1152 px) and on the right in desktops (screens equal or bigger than 1152 px)

sizes

fixed 8px grid size

WidthHeightPixel Size
Grid WidthGrid Heightpx
.w-1.h-18
.w-2.h-216
.w-3.h-324
.w-4.h-432
.........
.w-40.h-40320
.w-41.h-41328
.........
.w-143.h-1431144
.w-144.h-1441152

fixed 96px grid size

WidthHeightPixel SizeGrid Size
Grid WidthGrid Height8px gridpx
.gw-1.gh-11296
.gw-2.gh-224192
.gw-3.gh-336288
.gw-4.gh-448384
.gw-5.gh-560480
.gw-6.gh-672576
.gw-7.gh-784672
.gw-8.gh-896768
.gw-9.gh-9108864
.gw-10.gh-10120960
.gw-11.gh-111321056
.gw-12.gh-121441152

relative fluid sizes

WidthHeightFraction
Relative WidthRrelative Height--
.rw-1.rh-11/12
.rw-2.rh-22/12
.rw-3.rh-33/12
.rw-4.rh-44/12
.rw-5.rh-55/12
.rw-6.rh-66/12
.rw-7.rh-77/12
.rw-8.rh-88/12
.rw-9.rh-98/12
.rw-10.rh-1010/12
.rw-11.rh-1111/12
.rw-12.rh-1212/12
2.0.1

6 years ago

2.0.0

6 years ago

1.5.5

6 years ago

1.5.4

6 years ago

1.5.3

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.4.7

6 years ago

1.4.6

6 years ago

1.4.5

6 years ago

1.4.4

6 years ago

1.4.3

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago