Skip to content

Commit

Permalink
(docs) Make <pre> code be readable in dark mode also
Browse files Browse the repository at this point in the history
This is an additional fix for #174. Without this, the text used #333 on
black (#000) background, which is rather hard to read, to say the least.

This change retains the #333 color in light mode (where it makes sense),
but changes to use `inherit` in dark mode, which looks much better.
  • Loading branch information
Per Lundberg committed Apr 9, 2021
1 parent e94e121 commit 1f32a59
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/templates/darkerfx/styles/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/templates/darkerfx/styles/main.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions docs/templates/darkerfx/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ body.theme-dark {
--theme-inline-code: inherit;
--theme-inline-code-background: #454545;
--theme-code-border: #404040;
--theme-code-color: inherit;
--theme-border-subnav: #404040;
--theme-border-footer: #404040;
}
Expand Down Expand Up @@ -69,6 +70,7 @@ body.theme-light {
--theme-inline-code: #c7254e;
--theme-inline-code-background: #f9f2f4;
--theme-code-border: #e7e7e7;
--theme-code-color: #333;
--theme-border-footer: #e7e7e7;
}

Expand Down Expand Up @@ -428,6 +430,10 @@ pre {
background-color: inherit;
}

legend, pre {
color: var(--theme-code-color);
}

/*
* highlight.js custom theme (dark version)
*
Expand Down

0 comments on commit 1f32a59

Please sign in to comment.