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