bulma/sass/elements/table.sass

83 lines
1.8 KiB
Sass
Raw Normal View History

2016-10-30 12:20:51 +00:00
$table: $grey-darker !default
$table-background: $white !default
$table-border: $grey-lighter !default
2016-09-24 15:04:53 +00:00
2016-10-30 12:20:51 +00:00
$table-head: $grey !default
2016-09-24 15:04:53 +00:00
2016-10-30 12:20:51 +00:00
$table-row-hover-background: $white-bis !default
2017-04-15 16:08:30 +00:00
$table-row-active-background: $primary !default
$table-row-active: $primary-invert !default
2016-10-30 12:20:51 +00:00
$table-row-even-background: $white-bis !default
$table-row-even-hover-background: $white-ter !default
2016-09-24 15:04:53 +00:00
2016-01-24 00:03:43 +00:00
.table
2016-09-24 15:04:53 +00:00
background-color: $table-background
color: $table
2016-10-30 12:20:51 +00:00
margin-bottom: 1.5rem
2016-01-24 00:03:43 +00:00
width: 100%
2016-04-10 15:27:27 +00:00
td,
th
2016-09-24 15:04:53 +00:00
border: 1px solid $table-border
2016-01-24 00:03:43 +00:00
border-width: 0 0 1px
2016-10-30 12:20:51 +00:00
padding: 0.5em 0.75em
2016-01-24 00:03:43 +00:00
vertical-align: top
2016-04-10 15:27:27 +00:00
// Modifiers
2016-04-18 20:50:59 +00:00
&.is-narrow
2016-01-24 00:03:43 +00:00
white-space: nowrap
width: 1%
th
color: $text-strong
text-align: left
tr
&:hover
2016-09-24 15:04:53 +00:00
background-color: $table-row-hover-background
2017-04-15 16:08:30 +00:00
&.is-selected
background-color: $table-row-active-background
color: $table-row-active
a,
strong
color: currentColor
td,
th
border-color: $table-row-active
color: currentColor
2016-01-24 00:03:43 +00:00
thead
2016-04-10 15:27:27 +00:00
td,
th
2016-01-24 00:03:43 +00:00
border-width: 0 0 2px
2016-09-24 15:04:53 +00:00
color: $table-head
2016-10-30 14:59:46 +00:00
tfoot
td,
th
border-width: 2px 0 0
color: $table-head
2016-04-10 15:27:27 +00:00
tbody
tr
&:last-child
td,
th
border-bottom-width: 0
// Modifiers
2016-01-24 00:03:43 +00:00
&.is-bordered
2016-04-10 15:27:27 +00:00
td,
th
2016-01-24 00:03:43 +00:00
border-width: 1px
tr
2016-04-10 15:27:27 +00:00
&:last-child
td,
th
border-bottom-width: 1px
2016-01-24 00:03:43 +00:00
&.is-narrow
2016-04-10 15:27:27 +00:00
td,
th
2016-10-30 12:20:51 +00:00
padding: 0.25em 0.5em
2016-01-24 00:03:43 +00:00
&.is-striped
tbody
2016-04-10 15:27:27 +00:00
tr
2016-09-24 15:04:53 +00:00
&:nth-child(even)
background-color: $table-row-even-background
2016-04-10 15:27:27 +00:00
&:hover
2016-10-30 12:20:51 +00:00
background-color: $table-row-even-hover-background