Merge pull request #237 from AlexanderDavid/tables

Add CSS for tables to make them match the theme
This commit is contained in:
Djordje Atlialp 2021-01-10 17:33:14 +01:00 committed by GitHub
commit a07959254b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 1 deletions

46
assets/scss/_tables.scss Normal file
View file

@ -0,0 +1,46 @@
.post-content {
table {
border-collapse: collapse;
margin: 25px 0;
margin-left: auto;
margin-right: auto;
font-size: 0.9em;
font-family: sans-serif;
min-width: 400px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}
table thead tr {
background-color: $light-border-color;
color: $light-color;
text-align: left;
.dark-theme & {
background-color: $dark-border-color;
color: $dark-color
}
}
th, td {
padding: 12px 15px;
}
tbody tr {
border-bottom: 1px solid $light-border-color;
.dark-theme & {
border-bottom: 1px solid $dark-border-color;
}
}
// tbody tr:nth-of-type(even) {
// background-color: $light-background-secondary;
// .dark-theme & {
// background-color: $dark-background-secondary;
// }
// }
tbody tr:last-of-type {
border-bottom: 2px solid $light-border-color;
.dark-theme & {
border-bottom: 2px solid $dark-border-color;
}
}
}

View file

@ -15,3 +15,4 @@
@import "single"; @import "single";
@import "footer"; @import "footer";
@import "sharing-buttons"; @import "sharing-buttons";
@import "tables";