2019-10-13 14:12:30 +00:00
|
|
|
$table-color: $text-strong !default
|
|
|
|
$table-background-color: $scheme-main !default
|
2016-09-24 15:04:53 +00:00
|
|
|
|
2019-10-13 14:12:30 +00:00
|
|
|
$table-cell-border: 1px solid $border !default
|
2017-07-28 20:05:15 +00:00
|
|
|
$table-cell-border-width: 0 0 1px !default
|
|
|
|
$table-cell-padding: 0.5em 0.75em !default
|
|
|
|
$table-cell-heading-color: $text-strong !default
|
2016-09-24 15:04:53 +00:00
|
|
|
|
2017-07-28 20:05:15 +00:00
|
|
|
$table-head-cell-border-width: 0 0 2px !default
|
|
|
|
$table-head-cell-color: $text-strong !default
|
|
|
|
$table-foot-cell-border-width: 2px 0 0 !default
|
|
|
|
$table-foot-cell-color: $text-strong !default
|
2017-04-15 16:08:30 +00:00
|
|
|
|
2018-10-31 13:35:42 +00:00
|
|
|
$table-head-background-color: transparent !default
|
|
|
|
$table-body-background-color: transparent !default
|
|
|
|
$table-foot-background-color: transparent !default
|
|
|
|
|
2019-10-13 14:12:30 +00:00
|
|
|
$table-row-hover-background-color: $scheme-main-bis !default
|
2017-04-15 16:08:30 +00:00
|
|
|
|
2017-07-28 20:05:15 +00:00
|
|
|
$table-row-active-background-color: $primary !default
|
|
|
|
$table-row-active-color: $primary-invert !default
|
|
|
|
|
2019-10-13 14:12:30 +00:00
|
|
|
$table-striped-row-even-background-color: $scheme-main-bis !default
|
|
|
|
$table-striped-row-even-hover-background-color: $scheme-main-ter !default
|
2016-09-24 15:04:53 +00:00
|
|
|
|
2020-08-21 15:40:07 +00:00
|
|
|
$table-colors: $colors !default
|
|
|
|
|
2016-01-24 00:03:43 +00:00
|
|
|
.table
|
2018-09-04 13:24:50 +00:00
|
|
|
@extend %block
|
2017-07-28 20:05:15 +00:00
|
|
|
background-color: $table-background-color
|
|
|
|
color: $table-color
|
2016-04-10 15:27:27 +00:00
|
|
|
td,
|
|
|
|
th
|
2017-07-28 20:05:15 +00:00
|
|
|
border: $table-cell-border
|
|
|
|
border-width: $table-cell-border-width
|
|
|
|
padding: $table-cell-padding
|
2016-01-24 00:03:43 +00:00
|
|
|
vertical-align: top
|
2017-07-31 16:42:53 +00:00
|
|
|
// Colors
|
2020-08-21 15:40:07 +00:00
|
|
|
@each $name, $pair in $table-colors
|
2017-07-31 16:42:53 +00:00
|
|
|
$color: nth($pair, 1)
|
|
|
|
$color-invert: nth($pair, 2)
|
|
|
|
&.is-#{$name}
|
|
|
|
background-color: $color
|
|
|
|
border-color: $color
|
|
|
|
color: $color-invert
|
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%
|
2017-11-06 12:35:05 +00:00
|
|
|
&.is-selected
|
|
|
|
background-color: $table-row-active-background-color
|
|
|
|
color: $table-row-active-color
|
|
|
|
a,
|
|
|
|
strong
|
|
|
|
color: currentColor
|
2020-04-24 17:50:39 +00:00
|
|
|
&.is-vcentered
|
|
|
|
vertical-align: middle
|
2016-01-24 00:03:43 +00:00
|
|
|
th
|
2017-07-28 20:05:15 +00:00
|
|
|
color: $table-cell-heading-color
|
2019-03-22 23:58:41 +00:00
|
|
|
&:not([align])
|
2020-01-20 19:39:09 +00:00
|
|
|
text-align: inherit
|
2016-01-24 00:03:43 +00:00
|
|
|
tr
|
2017-04-15 16:08:30 +00:00
|
|
|
&.is-selected
|
2017-07-28 20:05:15 +00:00
|
|
|
background-color: $table-row-active-background-color
|
|
|
|
color: $table-row-active-color
|
2017-04-15 16:08:30 +00:00
|
|
|
a,
|
|
|
|
strong
|
|
|
|
color: currentColor
|
|
|
|
td,
|
|
|
|
th
|
2017-07-28 20:05:15 +00:00
|
|
|
border-color: $table-row-active-color
|
2017-04-15 16:08:30 +00:00
|
|
|
color: currentColor
|
2016-01-24 00:03:43 +00:00
|
|
|
thead
|
2018-10-31 13:35:42 +00:00
|
|
|
background-color: $table-head-background-color
|
2016-04-10 15:27:27 +00:00
|
|
|
td,
|
|
|
|
th
|
2017-07-28 20:05:15 +00:00
|
|
|
border-width: $table-head-cell-border-width
|
|
|
|
color: $table-head-cell-color
|
2016-10-30 14:59:46 +00:00
|
|
|
tfoot
|
2018-10-31 13:35:42 +00:00
|
|
|
background-color: $table-foot-background-color
|
2016-10-30 14:59:46 +00:00
|
|
|
td,
|
|
|
|
th
|
2017-07-28 20:05:15 +00:00
|
|
|
border-width: $table-foot-cell-border-width
|
|
|
|
color: $table-foot-cell-color
|
2016-04-10 15:27:27 +00:00
|
|
|
tbody
|
2018-10-31 13:35:42 +00:00
|
|
|
background-color: $table-body-background-color
|
2016-04-10 15:27:27 +00:00
|
|
|
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
|
2017-07-28 21:57:51 +00:00
|
|
|
&.is-fullwidth
|
|
|
|
width: 100%
|
2017-10-07 15:57:19 +00:00
|
|
|
&.is-hoverable
|
|
|
|
tbody
|
2017-10-18 09:36:39 +00:00
|
|
|
tr:not(.is-selected)
|
2017-10-07 15:57:19 +00:00
|
|
|
&:hover
|
|
|
|
background-color: $table-row-hover-background-color
|
|
|
|
&.is-striped
|
|
|
|
tbody
|
|
|
|
tr:not(.is-selected)
|
|
|
|
&:hover
|
2018-03-21 16:05:06 +00:00
|
|
|
background-color: $table-row-hover-background-color
|
|
|
|
&:nth-child(even)
|
|
|
|
background-color: $table-striped-row-even-hover-background-color
|
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
|
2017-05-05 10:08:53 +00:00
|
|
|
tr:not(.is-selected)
|
2016-09-24 15:04:53 +00:00
|
|
|
&:nth-child(even)
|
2017-07-28 20:05:15 +00:00
|
|
|
background-color: $table-striped-row-even-background-color
|
2018-03-26 14:33:31 +00:00
|
|
|
|
|
|
|
.table-container
|
2018-09-04 13:24:50 +00:00
|
|
|
@extend %block
|
2018-03-26 14:33:31 +00:00
|
|
|
+overflow-touch
|
|
|
|
overflow: auto
|
|
|
|
overflow-y: hidden
|
2018-04-09 13:15:31 +00:00
|
|
|
max-width: 100%
|