Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tables): fix tables overflowing divs and unaligned borders #160

Merged
merged 3 commits into from
May 24, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ node_modules
.vscode/
*.code-*
*.sublime-*
*.stylelintrc.json

.DS_Store

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 30 additions & 28 deletions components/Table/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,44 +46,46 @@
}
}

.markdown-body {
.markdown-body {
@include markdown-table;

.rdmd-table {
$border-wrap-width: 1px;

& {
position: relative;
display: block;
position: relative;
}
&:after {
content: ' ';
position: absolute;
box-shadow: inset 0 0 0 $border-wrap-width var(--table-edges, #dfe2e5);
width: 100%;
height: 100%;
top: 0;
pointer-events: none;
z-index: 1;
}

&-inner {
min-width: 100%;
box-sizing: content-box;
min-width: 100%;
overflow: auto;
width: 100%;
}
table:only-child {
margin: 0 !important;
billhimmelsbach marked this conversation as resolved.
Show resolved Hide resolved
thead th {
position: sticky;
left: 0;
z-index: 1;
background: inherit;
}
td:last-child,
th:last-child {
border-right: none;
}
thead tr,
thead th:last-child {
box-shadow: 3px 0 0 var(--table-head);

table {
border: 1px solid var(--table-edges, #dfe2e5);

&:only-child {
margin: 0 !important;

thead th {
background: inherit;
left: 0;
position: sticky;
z-index: 1;
billhimmelsbach marked this conversation as resolved.
Show resolved Hide resolved
billhimmelsbach marked this conversation as resolved.
Show resolved Hide resolved
}

td:last-child,
th:last-child {
border-right: none;
}

thead tr,
thead th:last-child {
box-shadow: 3px 0 0 var(--table-head);
}
}
}
}
Expand Down