2.9.1 • Published 6 years ago
grx v2.9.1
Grx
Grx is a layout grid powered by CSS3's flexbox module.
Grx allows you to implement scalable layouts in a dependable, declarative manner. The syntax is lightweight, relying on defaults as much as possible for easy rapid prototyping.
Demo page:
Installation:
npm install grx
bower install grx
Use Example:
grx-row align direct children horizontally. grx-col aligns direct children vertically.
<div class="grx-row">
<div>I'm a child, showing alongside my siblings</div>
<div>I'm another child, showing alongside my siblings</div>
<div>I'm another child, showing alongside my siblings</div>
</div>
simple column. Children align one below another.
<div class="grx-col">
<div>I'm a child, showing below/above my siblings</div>
<div>I'm another child, showing below/above my siblings</div>
<div>I'm another child, showing below/above my siblings</div>
</div>
children can have implicit/explicit sizes:
<div class="grx-row">
<div>
<!-- no size specified; takes up amount of space required for the content space. -->
<!-- if the logo is 128px wide, that's the div's width -->
<img src="logo.png"></img>
</div>
<div class="size-4">
<!-- one number - fraction out of 12; here, 4/12 or a third of the parent width -->
<input type="text" placeholder="Search">
</div>
<div class="size-2-5">
<!-- two numbers are nominator/denominator; here, 2/5 of the parent width -->
<button>Clear</button>
</div>
<div class="size-auto">
<!-- 'auto' children will take up all the remaining free space in the parent -->
<!-- multiple 'auto' children will split share space equally -->
<button>Submit</button>
</div>
</div>
items can be aligned by using directions as you see them
items-[direction1]-[optional:direction2]
<!-- directions can be: top, middle (vertical), bottom, left, center (horizontal), right -->
<div class="grx-row items-right">
<div>I'm aligned to right</div>
<div>I'm also aligned to right</div>
</div>
<div class="grx-row items-middle-right">
<div>I'm aligned to the right and also middle (vertically)</div>
</div>
Author
Michael (Mike) Shtilerman
License
This project is licensed under the MIT license. See the LICENSE file for more info.
2.9.1
6 years ago
2.9.0
6 years ago
2.8.1
8 years ago
2.8.0
8 years ago
2.7.0
8 years ago
2.6.2
9 years ago
2.6.1
9 years ago
2.6.0
9 years ago
2.5.1
9 years ago
2.4.4
9 years ago
2.4.3
9 years ago
2.4.2
9 years ago
2.4.1
9 years ago
2.4.0
9 years ago
2.3.2
9 years ago
2.3.1
9 years ago
2.3.0
9 years ago
2.2.3
9 years ago
2.2.1
9 years ago
2.2.0
9 years ago
2.1.0
9 years ago
2.0.5
9 years ago
2.0.4
9 years ago
2.0.3
9 years ago
2.0.1
9 years ago