Files
bulma/sass/elements/table.sass

98 lines
1.8 KiB
Sass
Raw Normal View History

2016-09-24 16:04:53 +01:00
$table: $text-strong !default
$table-background: $white !default
$table-border: $border !default
$table-head: $text-light !default
$table-row-hover-background: $white-ter !default
$table-row-even-background: $white-bis !default
2016-01-24 00:03:43 +00:00
.table
2016-09-24 16:04:53 +01:00
background-color: $table-background
color: $table
2016-01-24 00:03:43 +00:00
margin-bottom: 20px
width: 100%
2016-04-10 16:27:27 +01:00
td,
th
2016-09-24 16:04:53 +01:00
border: 1px solid $table-border
2016-01-24 00:03:43 +00:00
border-width: 0 0 1px
padding: 8px 10px
vertical-align: top
2016-04-10 16:27:27 +01:00
// Modifiers
2016-04-18 21:50:59 +01:00
&.is-icon
2016-04-10 16:27:27 +01:00
padding: 5px
text-align: center
white-space: nowrap
width: 1%
2016-04-10 16:27:27 +01:00
.fa
+fa(21px, 24px)
2016-04-18 21:50:59 +01:00
&.is-link
2016-04-10 16:27:27 +01:00
padding: 0
& > a
padding: 5px
2016-04-18 21:50:59 +01:00
&.is-link
2016-01-24 00:03:43 +00:00
padding: 0
& > a
display: block
padding: 8px 10px
&:hover
2016-06-29 23:59:48 +01:00
background-color: $link
2016-01-24 00:03:43 +00:00
color: $link-invert
2016-04-18 21:50:59 +01: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 16:04:53 +01:00
background-color: $table-row-hover-background
2016-01-24 00:03:43 +00:00
thead
2016-04-10 16:27:27 +01:00
td,
th
2016-01-24 00:03:43 +00:00
border-width: 0 0 2px
2016-09-24 16:04:53 +01:00
color: $table-head
2016-04-10 16:27:27 +01:00
tbody
tr
&:last-child
td,
th
border-bottom-width: 0
2016-01-24 00:03:43 +00:00
tfoot
2016-04-10 16:27:27 +01:00
td,
th
2016-01-24 00:03:43 +00:00
border-width: 2px 0 0
2016-09-24 16:04:53 +01:00
color: $table-head
2016-04-10 16:27:27 +01:00
// 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
2016-01-24 00:03:43 +00:00
&.is-narrow
2016-04-10 16:27:27 +01:00
td,
th
2016-01-24 00:03:43 +00:00
padding: 5px 10px
2016-04-10 16:27:27 +01:00
// Modifiers
2016-04-18 21:50:59 +01:00
&.is-icon
2016-01-24 00:03:43 +00:00
padding: 2px
2016-04-18 21:50:59 +01:00
&.is-link
2016-01-24 00:03:43 +00:00
padding: 0
& > a
padding: 2px
2016-04-18 21:50:59 +01:00
&.is-link
2016-04-10 16:27:27 +01:00
padding: 0
& > a
padding: 5px 10px
2016-01-24 00:03:43 +00:00
&.is-striped
tbody
2016-04-10 16:27:27 +01:00
tr
2016-09-24 16:04:53 +01:00
&:nth-child(even)
background-color: $table-row-even-background
2016-04-10 16:27:27 +01:00
&:hover
2016-09-24 16:04:53 +01:00
background-color: $table-row-hover-background