Debian Codegraph @

vendor/static/bulma/sass/elements/table.sass

raw
1 @import "../utilities/mixins"
2
3 $table-color: $text-strong !default
4 $table-background-color: $scheme-main !default
5
6 $table-cell-border: 1px solid $border !default
7 $table-cell-border-width: 0 0 1px !default
8 $table-cell-padding: 0.5em 0.75em !default
9 $table-cell-heading-color: $text-strong !default
10 $table-cell-text-align: left !default
11
12 $table-head-cell-border-width: 0 0 2px !default
13 $table-head-cell-color: $text-strong !default
14 $table-foot-cell-border-width: 2px 0 0 !default
15 $table-foot-cell-color: $text-strong !default
16
17 $table-head-background-color: transparent !default
18 $table-body-background-color: transparent !default
19 $table-foot-background-color: transparent !default
20
21 $table-row-hover-background-color: $scheme-main-bis !default
22
23 $table-row-active-background-color: $primary !default
24 $table-row-active-color: $primary-invert !default
25
26 $table-striped-row-even-background-color: $scheme-main-bis !default
27 $table-striped-row-even-hover-background-color: $scheme-main-ter !default
28
29 $table-colors: $colors !default
30
31 .table
32 @extend %block
33 background-color: $table-background-color
34 color: $table-color
35 td,
36 th
37 border: $table-cell-border
38 border-width: $table-cell-border-width
39 padding: $table-cell-padding
40 vertical-align: top
41 // Colors
42 @each $name, $pair in $table-colors
43 $color: nth($pair, 1)
44 $color-invert: nth($pair, 2)
45 &.is-#{$name}
46 background-color: $color
47 border-color: $color
48 color: $color-invert
49 // Modifiers
50 &.is-narrow
51 white-space: nowrap
52 width: 1%
53 &.is-selected
54 background-color: $table-row-active-background-color
55 color: $table-row-active-color
56 a,
57 strong
58 color: currentColor
59 &.is-vcentered
60 vertical-align: middle
61 th
62 color: $table-cell-heading-color
63 &:not([align])
64 text-align: $table-cell-text-align
65 tr
66 &.is-selected
67 background-color: $table-row-active-background-color
68 color: $table-row-active-color
69 a,
70 strong
71 color: currentColor
72 td,
73 th
74 border-color: $table-row-active-color
75 color: currentColor
76 thead
77 background-color: $table-head-background-color
78 td,
79 th
80 border-width: $table-head-cell-border-width
81 color: $table-head-cell-color
82 tfoot
83 background-color: $table-foot-background-color
84 td,
85 th
86 border-width: $table-foot-cell-border-width
87 color: $table-foot-cell-color
88 tbody
89 background-color: $table-body-background-color
90 tr
91 &:last-child
92 td,
93 th
94 border-bottom-width: 0
95 // Modifiers
96 &.is-bordered
97 td,
98 th
99 border-width: 1px
100 tr
101 &:last-child
102 td,
103 th
104 border-bottom-width: 1px
105 &.is-fullwidth
106 width: 100%
107 &.is-hoverable
108 tbody
109 tr:not(.is-selected)
110 &:hover
111 background-color: $table-row-hover-background-color
112 &.is-striped
113 tbody
114 tr:not(.is-selected)
115 &:hover
116 background-color: $table-row-hover-background-color
117 &:nth-child(even)
118 background-color: $table-striped-row-even-hover-background-color
119 &.is-narrow
120 td,
121 th
122 padding: 0.25em 0.5em
123 &.is-striped
124 tbody
125 tr:not(.is-selected)
126 &:nth-child(even)
127 background-color: $table-striped-row-even-background-color
128
129 .table-container
130 @extend %block
131 +overflow-touch
132 overflow: auto
133 overflow-y: hidden
134 max-width: 100%