Skip to content

Commit

Permalink
feat: WIKI-19593: implementation of new table design (#283)
Browse files Browse the repository at this point in the history
* feat: WIKI-19593: implementation of new table design

* fix: table styles

* fix: changed border-radius styles back.

* fix: left border fixed
  • Loading branch information
rusandorx authored Aug 23, 2023
1 parent c2ff77d commit c208540
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 7 deletions.
43 changes: 36 additions & 7 deletions src/scss/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
}

table {
color: #333333;
color: #333;

display: inline-block;
max-width: 100%;
Expand All @@ -155,22 +155,50 @@
position: relative;
z-index: 1;

border: 1px solid $borderColor;
box-sizing: border-box;
border-radius: 8px;
border-collapse: collapse;
border-collapse: separate;
border-spacing: 0;
background: $baseColor;

thead, tr:nth-child(2n) {
background-color: $tableRowBackgroundColor;
}

tr:first-child td:first-child {
border-top-left-radius: $tableBorderRadius;
}

tr:first-child td:last-child {
border-top-right-radius: $tableBorderRadius;
}

tr:last-child td:first-child {
border-bottom-left-radius: $tableBorderRadius;
}

tr:last-child td:last-child {
border-bottom-right-radius: $tableBorderRadius;
}

tr:first-child td {
border-top-style: solid;
}

tr td:first-child {
border-left: 1px solid $borderColor;
}

th, td {
padding: 10px 15px;
padding: 10px 20px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
border: 1px solid $borderColor;

p {
padding: 0;
margin: 0;
}
}

th {
Expand All @@ -180,7 +208,8 @@

td {
white-space: normal;
vertical-align: baseline;
vertical-align: top;
border-style: none solid solid none;
}
}

Expand Down Expand Up @@ -266,7 +295,7 @@
margin-bottom: 0;
}

&:not(.yfm_no-list-reset){
&:not(.yfm_no-list-reset) {
ol {
list-style-type: none;
counter-reset: list;
Expand Down
2 changes: 2 additions & 0 deletions src/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ $tableRowBackgroundColor: rgba(0, 0, 0, 0.02);

$linkColor: $accentColor;
$linkHoverColor: #004080;

$tableBorderRadius: 8px;

0 comments on commit c208540

Please sign in to comment.