Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit d0662ea

Browse files
committed
update table styles
1 parent 579ecd2 commit d0662ea

File tree

1 file changed

+50
-24
lines changed

1 file changed

+50
-24
lines changed

src/sass/app_2/_common/components/table.scss

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,78 @@
33
color: #333333; /* stylelint-disable-line color-no-hex */
44
font-size: 16px;
55
border-collapse: collapse;
6+
table-layout: fixed;
7+
width: 100vw;
68

79
&-row {
810
background-color: $COLOR_WHITE;
911
border-bottom: 1px solid #d2d3da; /* stylelint-disable-line color-no-hex */
1012
}
11-
&-thead {
13+
&-head {
1214
min-height: 40px;
15+
background-color: #fafafb; /* stylelint-disable-line color-no-hex */
1316

14-
& th {
17+
th {
1518
padding: 12px;
1619
font-weight: 600;
1720
text-align: left;
1821
border: none;
1922
background-color: #f4f4f6; /* stylelint-disable-line color-no-hex */
2023
}
21-
& th:first-child {
22-
padding-left: 16px;
23-
border-top-left-radius: 4px;
24-
}
25-
& th:last-child {
26-
padding-right: 16px;
27-
border-top-right-radius: 4px;
28-
}
2924
}
30-
&-tbody {
31-
& .table-row:hover {
32-
background-color: #fdf4ec; /* stylelint-disable-line color-no-hex */
25+
th:first-child, td:first-child {
26+
padding-left: 32px;
27+
}
28+
th:last-child, td:last-child {
29+
padding-right: 32px;
30+
}
31+
&-body {
32+
.table-row:hover {
33+
background-color: #e4e6f1; /* stylelint-disable-line color-no-hex */
3334
}
34-
& td {
35+
td {
3536
padding: 12px;
3637
border: none;
3738
}
38-
& td:first-child {
39-
padding-left: 16px;
39+
.profit {
40+
color: #4caf50; /* stylelint-disable-line color-no-hex */
4041
}
41-
& td:last-child {
42-
padding-right: 16px;
42+
.loss {
43+
color: #f44336; /* stylelint-disable-line color-no-hex */
4344
}
44-
& .profit {
45-
color: #2e8836; /* stylelint-disable-line color-no-hex */
45+
.amount {
46+
font-weight: bold;
4647
}
47-
& .loss {
48-
color: #c03; /* stylelint-disable-line color-no-hex */
48+
}
49+
// column widths
50+
.date, .ref {
51+
width: 6.5em;
52+
}
53+
.action {
54+
width: 7em;
55+
text-align: right;
56+
}
57+
.payout, .amount, .balance {
58+
width: 6em;
59+
text-align: right;
60+
}
61+
// styles for fixed table header
62+
&.table-clone {
63+
position: fixed;
64+
z-index: 100;
65+
pointer-events: none;
66+
67+
.table-head {
68+
pointer-events: auto;
69+
visibility: visible;
70+
}
71+
.table-body {
72+
visibility: hidden;
4973
}
5074
}
51-
&-pagination {
52-
margin-top: 16px;
75+
@media screen and (max-width: 980px) {
76+
.desc {
77+
display: none;
78+
}
5379
}
5480
}

0 commit comments

Comments
 (0)