Bulma: [feature] Add is-selected class for table row

Created on 6 Jan 2017  路  4Comments  路  Source: jgthms/bulma

Sometimes a table has selectable rows, but there is no built-in way to emphasize the selected one. A class is-selected (or similar) for tr elements would be helpful.

bulma feature

Most helpful comment

Something like this

.table {
    tr {
        &.is-selected,
        &.is-selected:hover {
            background: $primary;
            color: $primary-invert;
        }
    }
}

All 4 comments

Something like this

.table {
    tr {
        &.is-selected,
        &.is-selected:hover {
            background: $primary;
            color: $primary-invert;
        }
    }
}

If table has is-striped the strip color will override the is-selected color.

The hover colour will also override the is-selected colour, which makes the text illegible per #822

What if you want to add more properties than is-selected though? !important isn't very modular.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leofontes picture leofontes  路  3Comments

swthate picture swthate  路  3Comments

rogervila picture rogervila  路  3Comments

JenCant picture JenCant  路  3Comments

dotMastaz picture dotMastaz  路  3Comments