Skip to content

Commit

Permalink
Adjust text colors to enhance contrast
Browse files Browse the repository at this point in the history
  • Loading branch information
speth authored and ischoegl committed Aug 2, 2024
1 parent c017c06 commit eadfec4
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
38 changes: 36 additions & 2 deletions doc/doxygen/cantera-doxygen.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,46 @@
/* Colors to match pydata-sphinx-theme */
html {
--primary-color: rgb(10, 125, 145);
/* Colors to match pydata-sphinx-theme */
--primary-color: rgb(4, 97, 113);
--pst-color-text-muted: rgb(100, 100, 100);

/* Increase contrast of text in footer */
--page-secondary-foreground-color: rgb(81, 96, 112);

/* Improve contrast in code snippets */
--code-background: #fafafa;
--fragment-keyword: #a25999;
--fragment-keywordtype: #7a51aa;
--fragment-keywordflow: #a35822;
--fragment-comment: #666666;
--fragment-link: #4269ad;
--fragment-preprocessor: #2f7975;
--fragment-token: #387a4d;

/* Improve contrast in admonitions */
--todo-color-darker: #172d37;
--note-color-dark: #8e6100;
}

html.dark-mode {
--primary-color: rgb(63, 177, 197);
--pst-color-text-muted: rgb(164, 164, 164);

/* Improve contrast in admonitions */
--warning-color-dark: rgb(247, 66, 46);

/* Improve contrast of light text in "inline", "virtual", ... badges */
span.mlabel {
background-color: rgb(4, 97, 113);
}
}

/* Don't try to gray out the placeholder search text */
#MSearchField::placeholder {
color: var(--searchbar-foreground);
}

#MSearchField {
color: var(--searchbar-foreground);
}

.directory td.entry a:focus {
Expand Down
6 changes: 6 additions & 0 deletions doc/sphinx/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ html {
--pst-icon-external-link: "";
}

html[data-theme=light] {
/* Improve contrast with foreground colors */
--pst-color-surface: rgb(250, 250, 250);
--pst-color-primary: rgb(4, 97, 113);
}

p + div.math {
/* Remove post-paragraph space ahead of equation to center vertically */
margin-top: -1.15em;
Expand Down

0 comments on commit eadfec4

Please sign in to comment.