Skip to content

Commit

Permalink
[conf] Fix pygments style for sphinx_book_theme
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed May 19, 2024
1 parent a7ef599 commit d59a522
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions _static/sphinx-book-theme-custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,25 @@ code.code.literal {
.logo__image {
border-radius: 50%;
}

/* Fixup pygment styles for DiffLexer in ligth/dark theme
* i: increase, d: delete
*/
html[data-theme="light"] .highlight .gi {
color: #00A000;
}
html[data-theme="light"] .highlight .gd {
color: #A00000;
}
html[data-theme="dark"] .highlight .gi {
color: #A3BE8C; /* nord */
}
html[data-theme="dark"] .highlight .gd {
color: #BF616A; /* nord */
}

/* Fix literal style in dark them */
html[data-theme="dark"] code.code.literal {
background-color: var(--pst-color-surface);
border: 1px solid var(--pst-color-border);
}

0 comments on commit d59a522

Please sign in to comment.