diff --git a/assets/scss/_single.scss b/assets/scss/_single.scss index 6a0cca7..5efb20d 100644 --- a/assets/scss/_single.scss +++ b/assets/scss/_single.scss @@ -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%; diff --git a/assets/scss/_tables.scss b/assets/scss/_tables.scss index fc69bef..7fc2aaa 100644 --- a/assets/scss/_tables.scss +++ b/assets/scss/_tables.scss @@ -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; } } } diff --git a/assets/scss/_variables.scss b/assets/scss/_variables.scss index f380631..8674963 100644 --- a/assets/scss/_variables.scss +++ b/assets/scss/_variables.scss @@ -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; \ No newline at end of file