Improve table
This commit is contained in:
parent
1220741b2f
commit
2e723e3f05
3 changed files with 20 additions and 28 deletions
|
@ -44,8 +44,8 @@
|
||||||
&-cover {
|
&-cover {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin: 40px -50px;
|
margin: 40px -50px;
|
||||||
width: 860px;
|
width: $max-width;
|
||||||
max-width: 860px;
|
max-width: $max-width;
|
||||||
@media #{$media-size-tablet} {
|
@media #{$media-size-tablet} {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
@ -1,20 +1,21 @@
|
||||||
.post-content {
|
.post-content {
|
||||||
table {
|
table {
|
||||||
|
display: inline-block;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
margin: 25px 0;
|
margin: 25px auto;
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
font-family: sans-serif;
|
|
||||||
min-width: 400px;
|
min-width: 400px;
|
||||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
|
max-width: 100%;
|
||||||
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
table thead tr {
|
table thead tr {
|
||||||
background-color: $light-border-color;
|
background-color: $light-table-color;
|
||||||
color: $light-color;
|
color: $light-color;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
||||||
.dark-theme & {
|
.dark-theme & {
|
||||||
background-color: $dark-border-color;
|
background-color: $dark-table-color;
|
||||||
color: $dark-color
|
color: $dark-color
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,23 +25,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody tr {
|
tbody tr {
|
||||||
border-bottom: 1px solid $light-border-color;
|
border: 1px solid $light-table-color;
|
||||||
.dark-theme & {
|
.dark-theme & {
|
||||||
border-bottom: 1px solid $dark-border-color;
|
border: 1px solid $dark-table-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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,29 @@
|
||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
/* light theme color */
|
/* Light theme color */
|
||||||
$light-background: #fff;
|
$light-background: #fff;
|
||||||
$light-background-secondary: #eaeaea;
|
$light-background-secondary: #eaeaea;
|
||||||
$light-color: #222;
|
$light-color: #222;
|
||||||
$light-color-secondary: #999;
|
$light-color-secondary: #999;
|
||||||
$light-border-color: #dcdcdc;
|
$light-border-color: #dcdcdc;
|
||||||
|
$light-table-color: #dcdcdc;
|
||||||
|
|
||||||
/* dark theme colors */
|
/* Dark theme colors */
|
||||||
$dark-background: #232425;
|
$dark-background: #232425;
|
||||||
$dark-background-secondary: #3b3d42;
|
$dark-background-secondary: #3b3d42;
|
||||||
$dark-color: #e2e2e2;
|
$dark-color: #e2e2e2;
|
||||||
$dark-color-secondary: #b3b3bd;
|
$dark-color-secondary: #b3b3bd;
|
||||||
$dark-border-color: #73747b;
|
$dark-border-color: #73747b;
|
||||||
|
$dark-table-color: #73747b;
|
||||||
|
|
||||||
$media-size-phone: "(max-width: 684px)";
|
$media-size-phone: "(max-width: 684px)";
|
||||||
$media-size-tablet: "(max-width: 900px)";
|
$media-size-tablet: "(max-width: 900px)";
|
||||||
|
|
||||||
/* variables for js, must be the same as these in @custom-media queries */
|
/* Variables for js, must be the same as these in @custom-media queries */
|
||||||
:root {
|
:root {
|
||||||
--phoneWidth: (max-width: 684px);
|
--phoneWidth: (max-width: 684px);
|
||||||
--tabletWidth: (max-width: 900px);
|
--tabletWidth: (max-width: 900px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Content */
|
||||||
|
$max-width: 860px;
|
Loading…
Add table
Add a link
Reference in a new issue