The tables objects
aleutcss has some useful helpers for common table patterns.
Install using npm:
$ npm install --save-dev aleut.objects.tables
Usage
Basic usage of the table object uses the required class:
Foo Bar Foo Bar
Options
Other, optional classes can supplement the required base classes:
.o-table--fixed
: Force tables into having equal-width columns..o-table--tiny
: Tables with very tightly packed cells..o-table--small
: Lightly packed cells..o-table--flush
: Tables without padding.o-table--cells
: Add borders around atable
’s cells..o-table--rows
: Add borders only totable
’s rows..o-table--columns
: Add borders only totable
’s columns.
For example:
Foo Bar Foo Bar
Enable options
To enable the optional classes set the variables to true
before you import
the _objects.tables.scss
-file.
;;;;;;;
Modify styling
To modify the base styling you can change these variables and set them to your preferred options before you import the _objects.tables.scss
-file.
;;;
If you need more table-alternatives (as you probably do), it's recommended to make your own component (in its own file) that you style and add to the objects. For example:
Foo Bar Foo Bar