A Super Simple Lightweight Responsive Grid System, which works both using css and javascript..




Zoom in-out the page from your browser to see it in action..






What is SKSAR-GRID ?


SKSAR-GRID is a simple responsive grid system for modern web design. It is different from other Grid Systems, as it does not use fixed CSS media queries, but creates them automatically as and when needed.

The very core of the grid contains a simple 12-column layout css grid, (sksar-grid.css) with no media query breaks. Then upon it styles are added dynamically using javascript (sksar-grid.js)..



Installation


First import the "sksar-grid.css" file into the head section of your html page,
Secondly import the "sksar-grid.js" file at the end of the page,
Thats it..



Usage


Now you can enjoy creating grids using the following syntax,

<div class="col col-{min_value}-{max_value}"> {columns} </div>

Where {min_value} is the minimum browser width (in px), smaller than which the grid breaks,
and {max_value} is the maximum browser width (in px), greater than which the grid breaks again..


Note: The col-XXX-XXX is the class name javascript is looking for; When it finds such a class, it creates the appropriate css "@media" rules at the end of the page..

Example: col-480-1900, col-600-800, col-600-0, col-320-800

Note: To skip a value set it to zero, but remember that {min_value} should be less that {max_value}, but not in the case of zero..










EXAMPLES


1) Breaks when browser's width is less than 480px and greater than 1900px..

<div class="col col-480-1900"> {columns} </div>


Column of 4 units
Column of 8 units


2) Breaks when browser's width is less than 800px and greater than 1500px..

<div class="col col-800-1500"> {columns} </div>


Column of 4 units
Column of 4 units
Column of 4 units


3) Breaks when browser's width is only less than 800px, no maximum value given so it's set to zero..

<div class="col col-800-0"> {columns} </div>


Column of 6 units
Column of 6 units











12 - COLUMN LAYOUT

Much like other Responsive Grid Systems, sksar-grid also has a 12 column layout,
With classes starting from ".col-1" to ".col-12"





1
.col-11

.col-2
.col-10

.col-3
.col-9

.col-4
.col-8

.col-5
.col-7

.col-6
.col-6

.col-7
.col-5

.col-8
.col-4

.col-9
.col-3

.col-10
.col-2

.col-11
1




.col-6
.col-6

.col-4
.col-4
.col-4

.col-3
.col-3
.col-3
.col-3

.col-2
.col-2
.col-2
.col-2
.col-2
.col-2

1
1
1
1
1
1
1
1
1
1
1
1











View documentation on Github

sksar-grid is licensed under the Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0) License



Made by Soumya Kanti Sar