Modifying components with CSS
Last updated
Was this helpful?
Was this helpful?
// css classes as a list of strings
['class-name', {{ui.form.valid}} && 'valid'];
// or as an object
{
'class-name': true,
// will apply the 'valid' class only when form is valid
'valid': {{ui.form.valid}}
}<style>
ub-smart-table nb-card,
ub-smart-table datatable-selection,
ub-smart-table .datatable-footer,
ub-smart-table ub-bulk-edit-buttons {
/* background colors of card, title and etc. */
background-color: beige;
}
ub-smart-table ub-smart-table-header-cell,
ub-smart-table ub-smart-table-header-data-cell,
ub-smart-table ub-smart-table-header-action-cell {
/* table header background-color (columns names, filters, row-add and etc) */
background-color: beige;
}
ub-smart-table .datatable-body-row.active ub-smart-table-body-cell p,
ub-smart-table .datatable-body-row.active ub-smart-table-body-action-cell * {
/* table texts colors */
color: white !important;
}
ub-smart-table nb-card,
ub-smart-table nb-card-header,
ub-smart-table .datatable-footer,
ub-smart-table ub-smart-table-header-data-cell,
ub-smart-table ub-smart-table-header-action-cell,
ub-smart-table ub-smart-table-body-cell,
ub-smart-table .datatable-body-cell.action-cell {
/* main border color */
border-color: black !important;
}
ub-smart-table ub-smart-table-body-cell,
ub-smart-table ub-smart-table-body-action-cell {
/* default row background-color */
background-color: pink !important;
}
ub-smart-table .datatable-body-row.active ub-smart-table-body-cell,
ub-smart-table .datatable-body-row.active ub-smart-table-body-action-cell {
/* selected row background-color */
background-color: aquamarine !important;
}
ub-smart-table .datatable-body-row.active:hover ub-smart-table-body-cell,
ub-smart-table .datatable-body-row.active:hover ub-smart-table-body-action-cell {
/* selected-hovered row background-color */
background-color: skyblue !important;
}
ub-smart-table .datatable-body-row:hover ub-smart-table-body-cell,
ub-smart-table .datatable-body-row:hover ub-smart-table-body-action-cell {
/* hovered row background-color */
background-color: aqua !important;
}
</style><style>
nb-layout .layout {
background: yellow;
}
</style><style>
.blue nb-card {
background: lightblue!important;
}
.green nb-card {
background: lightgreen!important;
}
</style>{
'blue': {{index % 2 == 0}},
'green': {{index % 2 == 1}},
}