Skip to content

style: add dark style for pre and code #6382

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

Merged
merged 1 commit into from
Mar 27, 2023
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
style: add dark style for pre and code
  • Loading branch information
kovsu committed Mar 23, 2023
commit c209aaace39719c3c0ce1b8b7093e518d4d712c7
16 changes: 16 additions & 0 deletions site/src/theme/static/highlight.dark.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
html[data-doc-theme='dark'] {
pre code {
background: #262626;
border-color: #262626;
}

code[class*='language-'],
pre[class*='language-'] {
color: black;
}

:not(pre) > code[class*='language-'],
pre[class*='language-'] {
background: #262626;
}
}
1 change: 1 addition & 0 deletions site/src/theme/static/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@import './toc';
@import './not-found';
@import './highlight';
@import './highlight.dark';
@import './demo';
@import './icons';
@import './mock-browser';
Expand Down