ResponCSS

Respond dynamically.

ResponCSS is a fluid responsive CSS layout framework based on a dynamic set of columns. By adding or subtracting columns based on screen width, developers are able to take full advantage of a wide array of screen resolutions and free their web apps from the inflexibility (not to mention cross browser headaches) of pixel driven layouts.

Columns

As stated above the number of columns changes depending on screen. This table shows the default settings for ResponCSS.

Screens Class Prefix Target Layout width Columns
Small .s- Smartphones and Portrait Tablets 768px and below 4
Medium .m- Landscape Tablets 769px to 979px 8
Large .l- Average Desktops 980px to 1209px 12
Xtra Large .xl- Large Display Desktops 1210px and up 16

Current Screen Size:

Small : 4 Columns Medium : 8 Columns Large : 12 Columns Extra Large : 16 Columns

Containers

Containers are designed to be high level parents in your layout. They can be assigned to span a different number of columns for each screen size.

Containers Grid | .s-1, .m-6, l-9, .xl-15

.s-1 .m-4 .l-7 .xl-1
.s-3 .m-4 .l-5 .xl-15
.s-3 .m-2 .l-2 .xl-6
.s-1 .m-6 .l-10 .xl-10
.s-2 .m-3 .l-4 .xl-13
.s-2 .m-5 .l-8 .xl-3
.s-4 .m-8 .l-12 .xl-16

Centered | .center

Simply add the class ".center" to center a container.

.s-1.center .m-1.center .l-1.center .xl-1.center
.s-2.center .m-3.center .l-4.center .xl-5.center
.s-3.center .m-5.center .l-8.center .xl-11.center
.m-7.center .l-11.center .xl-15.center

Shortcuts | .qtr, .half, .s-qtr3, .xl-full

If you know you want a container to span the same no across all screen sizes, you can use one of these shortcuts without assigning a size.

.full
.qtr3
.qtr
.half
.s-half .m-half .l-half .xl-half
.s-qtr .m-qtr .l-qtr .xl-qtr
.s-qtr .m-qtr .l-qtr .xl-qtr
.qtr
.qtr

Overs | .s-over-2, .over-half

Want to push some containers around? That's what overs are for.

.qtr
.qtr .over-half
.qtr .over-half
.qtr
.half .over-qtr

Block Grids

Block grids are designed to be used when you want a certain number of items per row. The blocks are floated left and will flow into a grid pattern. Block grids are available in 1 - 10 blocks per row.

One | .s-g-1, .g-1

.g-1
.s-g-1 .m-g-1 .l-g-1 .xl-g-1

Two | .s-g-2, .g-2

.g-2
.g-2
.s-g-2 .m-g-2 .l-g-2 .xl-g-2

Three | .s-g-3, .g-3

.g-3
.g-3
.g-3
.s-g-3 .m-g-3 .l-g-3 .xl-g-3

Four | .s-g-4, .g-4

.g-4
.g-4
.g-4
.g-4
.g-4
.g-4
.s-g-4 .m-g-4 .l-g-4 .xl-g-4

Five | .s-g-5, .g-5

.g-5
.g-5
.g-5
.g-5
.g-5
.g-5
.g-5
.s-g-5 .m-g-5 .l-g-5 .xl-g-5

Bonus LESS Mixins, Variables and CSS Classes

LESS Class Description
.clearfix() .cf Make sure container contains floats
n/a .clear Applies "clear: both" style
@c-gutter n/a Adjusts the ratio of column to gutter width. Set to 0 for no gutters.
@g-gutter n/a Adjusts the ratio of block grid to gutter width. Set to 0 for no gutters.
$s-max-width n/a Max width for small screen media query
@m-min-width n/a Min width for medium screen media query
@m-max-width n/a Max width for medium screen media query
@l-min-width n/a Min width for large screen media query
@l-max-width n/a Max width for large screen media query
@xl-min-width n/a Min width for extra large screen media query
@xl-max-width n/a Max width for extra large screen media query

Recommendations

ResponCSS is just a small piece of responsive sweetness, so do yourself a favor and use it with: