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 table border on dark-mode #273

Merged
merged 1 commit into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 11 additions & 1 deletion _posts/2021-04-27-dark-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Click the half-moon most top-right button to turn the lights on/off.
###### [Level 6](http://localhost)


# Code highlight
## Code highlight
Mode specific code highlighting themes.

```python
Expand Down Expand Up @@ -105,3 +105,13 @@ spam = 42 # UNCOLOURED: assignment
all # Built-in functions
GeneratorExit # Exceptions
```

## Tables

| hex | dec | oct |
| - | - | - |
| 0 | 0 | 0 |
| 5 | 5 | 5 |
| A | 10 | 12 |
| F | 16 | 20 |
| F5 | 21 | 25 |
2 changes: 2 additions & 0 deletions _sass/base/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ html, html[data-theme="light"] {
--h5: #262626;
--h6: #262626;
--border: rgba(0, 0, 0, 0.1);
--td-border: rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] {
Expand All @@ -130,4 +131,5 @@ html[data-theme="dark"] {
--h5: #6bac00;
--h6: #ff5c00;
--border: rgba(0, 0, 0, 0.1); // border
--td-border: rgba(255, 255, 255, 0.5); // table border
}
4 changes: 4 additions & 0 deletions _sass/layouts/_posts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,7 @@ header {
}
}
}

td, th {
border: 1px solid var(--td-border);
}