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 {
|
||||
border-radius: 8px;
|
||||
margin: 40px -50px;
|
||||
width: 860px;
|
||||
max-width: 860px;
|
||||
width: $max-width;
|
||||
max-width: $max-width;
|
||||
@media #{$media-size-tablet} {
|
||||
margin: 20px 0;
|
||||
width: 100%;
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
.post-content {
|
||||
table {
|
||||
display: inline-block;
|
||||
border-collapse: collapse;
|
||||
margin: 25px 0;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin: 25px auto;
|
||||
font-size: 0.9em;
|
||||
font-family: sans-serif;
|
||||
min-width: 400px;
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
table thead tr {
|
||||
background-color: $light-border-color;
|
||||
background-color: $light-table-color;
|
||||
color: $light-color;
|
||||
text-align: left;
|
||||
|
||||
.dark-theme & {
|
||||
background-color: $dark-border-color;
|
||||
background-color: $dark-table-color;
|
||||
color: $dark-color
|
||||
}
|
||||
}
|
||||
|
@ -24,23 +25,9 @@
|
|||
}
|
||||
|
||||
tbody tr {
|
||||
border-bottom: 1px solid $light-border-color;
|
||||
border: 1px solid $light-table-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;
|
||||
border: 1px solid $dark-table-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +1,29 @@
|
|||
@charset "UTF-8";
|
||||
|
||||
/* light theme color */
|
||||
/* Light theme color */
|
||||
$light-background: #fff;
|
||||
$light-background-secondary: #eaeaea;
|
||||
$light-color: #222;
|
||||
$light-color-secondary: #999;
|
||||
$light-border-color: #dcdcdc;
|
||||
$light-table-color: #dcdcdc;
|
||||
|
||||
/* dark theme colors */
|
||||
/* Dark theme colors */
|
||||
$dark-background: #232425;
|
||||
$dark-background-secondary: #3b3d42;
|
||||
$dark-color: #e2e2e2;
|
||||
$dark-color-secondary: #b3b3bd;
|
||||
$dark-border-color: #73747b;
|
||||
$dark-table-color: #73747b;
|
||||
|
||||
$media-size-phone: "(max-width: 684px)";
|
||||
$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 {
|
||||
--phoneWidth: (max-width: 684px);
|
||||
--tabletWidth: (max-width: 900px);
|
||||
}
|
||||
|
||||
/* Content */
|
||||
$max-width: 860px;
|
Loading…
Add table
Add a link
Reference in a new issue