Skip to content

Commit 0bdb5ec

Browse files
authored
Merge pull request #42 from tgiachi/docs/dark-code-contrast
docs: fix dark-mode contrast on API reference
2 parents b44333b + 7264ffd commit 0bdb5ec

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

docs/templates/squidstd/public/main.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ table > thead { background-color: rgba(75, 180, 189, 0.12); }
5353
/* Affix (right-hand "In this article") active marker. */
5454
.affix ul li.active > a { color: var(--sqd-brand); border-left-color: var(--sqd-brand); }
5555

56+
/* Dark mode: the brand teals are too dark against the ink background - lift to the light accent.
57+
Inline code especially matters on API reference pages, which are full of type/member names. */
58+
[data-bs-theme="dark"] :not(pre) > code { color: var(--sqd-accent); }
59+
[data-bs-theme="dark"] .toc .nav-link.active { color: var(--sqd-accent) !important; }
60+
[data-bs-theme="dark"] .affix ul li.active > a { color: var(--sqd-accent); border-left-color: var(--sqd-accent); }
61+
5662
/* Package READMEs use <h1 align="center"> for GitHub/NuGet; on the site keep typography consistent. */
5763
article h1[align] {
5864
text-align: start;

0 commit comments

Comments
 (0)