Skip to content

Commit

Permalink
fix(AsyncReplication): fix table styles (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemmufazalov authored Jun 10, 2024
1 parent 780073e commit f879369
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 42 deletions.
34 changes: 1 addition & 33 deletions src/containers/App/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ body,
:root {
--g-color-base-yellow-light: rgba(255, 199, 0, 0.15);
--g-color-base-yellow-medium: rgba(255, 219, 77, 0.4);

--data-table-row-height: 40px;
}

.g-root {
Expand Down Expand Up @@ -74,42 +72,12 @@ body,
.app {
height: 100%;
@include flex-container();
@include data-table-styles();

&__main {
overflow: auto;
@include flex-container();
}

.data-table {
width: 100%;
@include body-2-typography();

&__table {
max-width: 100%;

border-spacing: 0;
border-collapse: separate;
}
}

.data-table__th {
font-weight: bold;

border-top: unset;
border-right: unset;
border-left: unset;
}

.data-table__sticky .data-table__th,
.data-table__td {
height: var(--data-table-row-height);

vertical-align: middle;

border-top: unset;
border-right: unset;
border-left: unset;
}
}

.error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@
&:not(:last-child) {
margin-bottom: var(--diagnostics-section-margin);
}

th {
height: 40px;

vertical-align: middle;
}
}

&__top-queries-row {
Expand Down
38 changes: 35 additions & 3 deletions src/styles/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,45 @@
@include body-2-typography();
}

@mixin query-data-table() {
& .data-table {
@mixin data-table-styles {
--data-table-row-height: 40px;
--data-table-cell-align: middle;
--data-table-head-align: middle;

.data-table {
@include body-2-typography();

&__th,
&__td {
vertical-align: middle;
height: var(--data-table-row-height);

border-top: unset;
border-right: unset;
border-left: unset;
}

&__th {
font-weight: bold;
}

&__table {
border-spacing: 0;
border-collapse: separate;
}
}

// DataTable with moving head is actually made of two separate tables
// The second table has header with zero height, so it's actually invisible
// There should not be any height set for this header
.data-table__box_sticky-head_moving {
.data-table__th {
height: unset;
}
}
}

@mixin query-data-table() {
& .data-table {
&__box {
.data-table__table-wrapper {
padding-bottom: 20px;
Expand Down

0 comments on commit f879369

Please sign in to comment.