Skip to content

Commit

Permalink
fix: table styles in edit mode (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini authored Dec 19, 2024
1 parent 2504f8d commit 81090ca
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 13 deletions.
42 changes: 42 additions & 0 deletions src/theme/_cms-ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,48 @@ body.cms-ui {
.block.text {
line-height: 1.555;
}

&.table {
@import 'bootstrap/scss/reboot';
@import 'bootstrap/scss/tables';
@import 'bootstrap-italia/src/scss/custom/tables';
@import 'extras/tables';

.ui.table {
&.inverted {
th,
td {
border-color: inherit !important;
}
}
thead th {
font-weight: bold;
text-transform: unset;
color: var(--bs-table-color);
}

&.very.basic {
&:not(.sortable):not(.striped) {
th:first-child,
td:first-child {
padding-left: 0.5rem;
}
thead tr:first-child th {
padding-top: 0.5rem;
}
td:last-child {
padding-right: 0.5rem;
}
}
}

&.striped {
tbody tr:nth-child(2n) {
background-color: rgba(0, 0, 50, 0.02) !important;
}
}
}
}
}

&.contenttype-document,
Expand Down
25 changes: 12 additions & 13 deletions src/theme/extras/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,30 @@
&.very.basic {
border: none;

tbody > tr {
th,
td {
&:first-of-type {
th,
td {
border-top: none;
}
border-left: none;
}

&:last-of-type {
border-right: none;
}
}

tbody > tr {
&:first-of-type {
th,
td {
border-bottom: none;
border-top: none;
}
}

th,
td {
&:first-of-type {
border-left: none;
}

&:last-of-type {
border-right: none;
}
border-bottom: none;
}
border-width: 0;
}
}

Expand Down

0 comments on commit 81090ca

Please sign in to comment.