As much as possible, QuickGrid tries to leave styling to your own custom CSS. For example, if you want to set column widths, have a sticky header row while scrolling, or change the fonts and colors, you would achieve all of that by writing your own CSS.The examples throughout this site show how CSS can be used to achieve different layout options.
QuickGrid
accepts a parameter called Theme
. This can be any arbitrary
string value, and by default takes the value "default"
. This value is emitted as an
HTML attribute on the table
element (for example, theme="default"
).
You can use this if you want to replace the minimal built-in CSS rules at a low level. For example,
if you set theme="corporate"
, QuickGrid's default typography rules will no longer apply,
and you can instead define new ones that match this selector. Here's an example:
1 | Jean | Martin | 1985-03-16 |
2 | António | Langa | 1991-12-01 |
3 | Julie | Smith | 1958-10-10 |
4 | Nur | Sari | 1922-04-27 |
5 | Jose | Hernandez | 2011-05-03 |
6 | Kenji | Sato | 2004-01-09 |
In most cases it's not necessary or beneficial to define a "theme", since you can use regular
scoped CSS to apply particular styles to the grid in a particular component. It's only relevant
to define a theme if you intend to use it across many grids. Even then, you can alternatively
match grids based on CSS class (see the Class
parameter).