Skip to content

Commit f879369

Browse files
fix(AsyncReplication): fix table styles (#891)
1 parent 780073e commit f879369

File tree

3 files changed

+36
-42
lines changed

3 files changed

+36
-42
lines changed

src/containers/App/App.scss

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ body,
2828
:root {
2929
--g-color-base-yellow-light: rgba(255, 199, 0, 0.15);
3030
--g-color-base-yellow-medium: rgba(255, 219, 77, 0.4);
31-
32-
--data-table-row-height: 40px;
3331
}
3432

3533
.g-root {
@@ -74,42 +72,12 @@ body,
7472
.app {
7573
height: 100%;
7674
@include flex-container();
75+
@include data-table-styles();
7776

7877
&__main {
7978
overflow: auto;
8079
@include flex-container();
8180
}
82-
83-
.data-table {
84-
width: 100%;
85-
@include body-2-typography();
86-
87-
&__table {
88-
max-width: 100%;
89-
90-
border-spacing: 0;
91-
border-collapse: separate;
92-
}
93-
}
94-
95-
.data-table__th {
96-
font-weight: bold;
97-
98-
border-top: unset;
99-
border-right: unset;
100-
border-left: unset;
101-
}
102-
103-
.data-table__sticky .data-table__th,
104-
.data-table__td {
105-
height: var(--data-table-row-height);
106-
107-
vertical-align: middle;
108-
109-
border-top: unset;
110-
border-right: unset;
111-
border-left: unset;
112-
}
11381
}
11482

11583
.error {

src/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,6 @@
5454
&:not(:last-child) {
5555
margin-bottom: var(--diagnostics-section-margin);
5656
}
57-
58-
th {
59-
height: 40px;
60-
61-
vertical-align: middle;
62-
}
6357
}
6458

6559
&__top-queries-row {

src/styles/mixins.scss

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,45 @@
9494
@include body-2-typography();
9595
}
9696

97-
@mixin query-data-table() {
98-
& .data-table {
97+
@mixin data-table-styles {
98+
--data-table-row-height: 40px;
99+
--data-table-cell-align: middle;
100+
--data-table-head-align: middle;
101+
102+
.data-table {
103+
@include body-2-typography();
104+
99105
&__th,
100106
&__td {
101-
vertical-align: middle;
107+
height: var(--data-table-row-height);
108+
109+
border-top: unset;
110+
border-right: unset;
111+
border-left: unset;
102112
}
103113

114+
&__th {
115+
font-weight: bold;
116+
}
117+
118+
&__table {
119+
border-spacing: 0;
120+
border-collapse: separate;
121+
}
122+
}
123+
124+
// DataTable with moving head is actually made of two separate tables
125+
// The second table has header with zero height, so it's actually invisible
126+
// There should not be any height set for this header
127+
.data-table__box_sticky-head_moving {
128+
.data-table__th {
129+
height: unset;
130+
}
131+
}
132+
}
133+
134+
@mixin query-data-table() {
135+
& .data-table {
104136
&__box {
105137
.data-table__table-wrapper {
106138
padding-bottom: 20px;

0 commit comments

Comments
 (0)