bricks-css
v0.0.7
Published
A tiny, responsive grid.
Downloads
3
Readme
Bricks
A tiny (~2kb), responsive grid.
Get Bricks
Bricks is still beta. Use with caution
From npm
Install node, which bundles the Node Package Manager (npm)
Navigate to the project root and install the package
npm install bricks-css
You'll find the file to include here:
./node_modules/bricks-css/dist/bricks.min.css
From Sourcce
Install node, which bundles the Node Package Manager (npm)
Clone this repository
git clone https://github.com/robotnoises/Bricks.git
Navigate to the project root and install the dependencies
npm install
Compile the SASS into CSS
grunt build
The minified CSS will be here:
./dist/bricks.min.css
How to use Bricks
A
brick
represents a side-by-side container. What you put inside a brick is up to you.A
wall
contains bricks. You can put as many bricks in a wall as you like. By default, a wall will take up 100% of its own container. You can make a wall as wide or narrow as you like.You can control the amount of proportional row space a brick occupies by giving it a special
p-*
class like this:<div class="brick p-1-3"></div>
, which will take up one-third of the space.You can put a max of
6
bricks in a row before they start breaking to the next line, E.g.
<div class="wall">
<div class="brick p-1-6"></div>
<div class="brick p-1-6"></div>
<div class="brick p-1-6"></div>
<div class="brick p-1-6"></div>
<div class="brick p-1-6"></div>
<div class="brick p-1-6"></div>
</div>
If you want more than 6 bricks in a row, just leave-off the
p-*
class. These bricks will display as if they were cells in a table row, which you can add an unlimited amount of.If you want a brick to have a fixed width, you may add that style in a separate class of your choosing. If you want the bricks around it to take up the remaining side-to-side space, leave-off the
p-*
class. E.g.
<div class="wall">
<div class="brick fixed"> <!-- .fixed { width: 300px; } -->
<!-- Content here -->
</div>
<div class="brick">
<!-- Will occupy the remaining space to the right... -->
</div>
</div>
Available proportions
1/2 brick p-1-2
1/3 brick p-1-3
1/4 brick p-1-4
1/5 brick p-1-5
1/6 brick p-1-6
2/3 brick p-2-3
3/4 brick p-3-4
2/5 brick p-2-5
3/5 brick p-3-5
4/5 brick p-4-5
Browser support
- All the good ones
- IE9+