The 12 Columns Grid
In addition to the layouts, OxyProps 12Grid is a specific set of classes to achieve complex layouts using a 12 columns grid.
The parent container
Just apply the class o-12-grid to a container (either an oxygen section or a div) to genenrate the 12 columns grid.
Helper lines
To help you design your layout over the 12 columns, create a temporary div (you will delete it when you are finished). Give the class o-12-grid-helper-lines to this div.
This will generate subtle underlying vertical lines to help you visualize the columns.
This will generate subtle underlying vertical lines to help you visualize the columns.
I am a div on a 12 cols grid
spanning from col 2 for 10 cols
spanning from col 2 for 10 cols
Simple Spans
You can make an element span multiple columns with the class o-span-{2-12} or span multiple rows with the class o-rspan-{1-12}.
o-span-6
o-span-3
o-span-2
o-rspan-2
o-rspan-3
o-span-8
o-span-11
Media Queries
You can assign different spans for different breakpoints. Give the class o-{breakpoint}-span-{1-12} to the element.
Use o-{breakpoint}-rspan-{1-12} for rows.
Available breakpoints are : xxs - xs - sm - md - lg - xl - xxl
Use o-{breakpoint}-rspan-{1-12} for rows.
Available breakpoints are : xxs - xs - sm - md - lg - xl - xxl
o-span-6
o-lg-span-12
o-span-6
o-lg-span-12
o-span-3
o-lg-span-6
o-md-span-12
o-span-3
o-lg-span-6
o-md-span-12
o-span-3
o-lg-span-6
o-md-span-12
o-span-3
o-lg-span-6
o-md-span-12
Start columns and row
You can specify the starting column or row for an element with the class o-cstart-{1-12} or o-rstart-{1-12}.
o-cstart-2
o-span-5
Media Queries
Decide of the start columns and rows per breakpoints with the class o-{breakpoint}-cstart-{1-12} for columns and o-{breakpoint}-rstart-{1-12} for rows.
Available breakpoints are : xxs - xs - sm - md - lg - xl - xxl
Available breakpoints are : xxs - xs - sm - md - lg - xl - xxl
o-span-6
o-xxl-cstart-3
o-xl-cstart-7
o-lg-cstart-5
Advanced Spans
You can make an element span multiple columns and specify the start column with the class o-span-{1-12}-{1-12} which reads in plain english o-span-{from column X}-{for Y columns}.
For example, o-span-3-7 is an element than spans from column 3 for 7 columns (up to column 9). o-rspan-2-2 is an element than spans from row 2 for 2 rows (up to row 3).
o-span-3-7
o-span-2-4
o-span-3-6
o-span-10-3
o-rspan-2-2
Media Queries
These advanced spans also support different breakpoints. Give the class o-{breakpoint}-span-{1-12}-{1-12} to the element.
Available breakpoints are : xxs - xs - sm - md - lg - xl - xxl
Available breakpoints are : xxs - xs - sm - md - lg - xl - xxl
o-span-4-7
o-xxl-span-3-8
o-xl-span-8-5
o-lg-span-3-3
o-md-span-4-6
o-sm-span-12
Reordering Elements
You can visualy reorder an element with the classes o-first and o-last.
Please note that this reorder elements visually, but doesn't modify the DOM. Just keep that in mind for accessibility and keyboard navigation.
o-span-3
1st in DOM
o-span-3
o-last
2nd in DOM
o-span-3
o-first
3rd in DOM
o-span-3
4th in DOM
Media Queries
Reorder elements at a given breakpoint. Give the class o-{breakpoint}-{first-last} to the element.
Available breakpoints are : xxs - xs - sm - md - lg - xl - xxl
Available breakpoints are : xxs - xs - sm - md - lg - xl - xxl
o-span-3
o-lg-last
1st in DOM
o-span-3
2nd in DOM
o-span-3
o-md-first
3rd in DOM
o-span-3
4th in DOM