Add customisation variables

This commit is contained in:
Jeremy Thomas
2017-07-28 21:05:15 +01:00
parent 2e08a844d7
commit 1be49f2190
47 changed files with 888 additions and 683 deletions

58
sass/elements/table.sass Normal file → Executable file
View File

@@ -1,58 +1,66 @@
$table: $grey-darker !default
$table-background: $white !default
$table-border: $grey-lighter !default
$table-color: $grey-darker !default
$table-background-color: $white !default
$table-head: $grey !default
$table-cell-border: 1px solid $grey-lighter !default
$table-cell-border-width: 0 0 1px !default
$table-cell-padding: 0.5em 0.75em !default
$table-cell-heading-color: $text-strong !default
$table-row-hover-background: $white-bis !default
$table-head-color: $grey !default
$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
$table-row-active-background: $primary !default
$table-row-active: $primary-invert !default
$table-row-hover-background-color: $white-bis !default
$table-row-even-background: $white-bis !default
$table-row-even-hover-background: $white-ter !default
$table-row-active-background-color: $primary !default
$table-row-active-color: $primary-invert !default
$table-striped-row-even-background-color: $white-bis !default
$table-striped-row-even-hover-background-color: $white-ter !default
.table
background-color: $table-background
color: $table
background-color: $table-background-color
color: $table-color
margin-bottom: 1.5rem
width: 100%
td,
th
border: 1px solid $table-border
border-width: 0 0 1px
padding: 0.5em 0.75em
border: $table-cell-border
border-width: $table-cell-border-width
padding: $table-cell-padding
vertical-align: top
// Modifiers
&.is-narrow
white-space: nowrap
width: 1%
th
color: $text-strong
color: $table-cell-heading-color
text-align: left
tr
&:hover
background-color: $table-row-hover-background
background-color: $table-row-hover-background-color
&.is-selected
background-color: $table-row-active-background
color: $table-row-active
background-color: $table-row-active-background-color
color: $table-row-active-color
a,
strong
color: currentColor
td,
th
border-color: $table-row-active
border-color: $table-row-active-color
color: currentColor
thead
td,
th
border-width: 0 0 2px
color: $table-head
border-width: $table-head-cell-border-width
color: $table-head-cell-color
tfoot
td,
th
border-width: 2px 0 0
color: $table-head
border-width: $table-foot-cell-border-width
color: $table-foot-cell-color
tbody
tr
&:last-child
@@ -77,6 +85,6 @@ $table-row-even-hover-background: $white-ter !default
tbody
tr:not(.is-selected)
&:nth-child(even)
background-color: $table-row-even-background
background-color: $table-striped-row-even-background-color
&:hover
background-color: $table-row-even-hover-background
background-color: $table-striped-row-even-hover-background-color