UNPKG

1.59 kBSCSSView Raw
1$table-cell-padding: $space-normal;
2$table-color: $color-dark-slate-gray;
3$table-head-background-color: $color-light-gray;
4$table-striped-row-even-background-color: $color-lighter-gray;
5$table-cell-border: 1px solid $color-light-gray;
6
7@import "bulma/sass/elements/table.sass";
8
9.number-cell {
10 text-align: right !important;
11}
12
13.table {
14 @extend .body-normal;
15
16 line-height: 1.5;
17}
18
19.is-responsive {
20 @media only screen and (max-width: 760px),(min-device-width: $tablet) and (max-device-width: $desktop) {
21 table, thead, tbody, th, td, tr {
22 display: block;
23 }
24
25 thead tr {
26 position: absolute;
27 top: -9999px;
28 left: -9999px;
29 }
30
31 tr {
32 margin-top: $space-normal;
33 }
34
35 td {
36 position: relative;
37 text-align: left !important;
38 padding-left: calc(45% + 1rem);
39 background-color: $color-white;
40 }
41
42 td:nth-child(2n) {
43 background-color: $color-lighter-gray;
44 }
45
46 td:first-child {
47 border-top-left-radius: $space-smaller;
48 border-top-right-radius: $space-smaller;
49 }
50
51 td:last-child {
52 border-bottom-left-radius: $space-smaller;
53 border-bottom-right-radius: $space-smaller;
54 }
55
56 td:before {
57 position: absolute;
58 top: 0;
59 left: 0;
60 font-size: $font-size-body-normal;
61 font-weight: bold;
62 line-height: 1.5;
63 height: 100%;
64 width: 45%;
65 padding: $space-normal;
66 background-color: $color-light-gray;
67 border-right: 0.0625rem solid $color-light-gray;
68 }
69
70 td:nth-of-type(n):before { content: attr(data-label);}
71 }
72}