-
Notifications
You must be signed in to change notification settings - Fork 0
Polish typography for GitHub-like font rendering and spacing #46
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
Changes from all commits
9fdd566
c171cac
a3169b1
bea8add
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,9 +52,10 @@ | |
| --docusaurus-highlighted-code-line-bg: rgba(47, 129, 247, 0.2); | ||
| --site-border: #30363d; | ||
| --site-surface: #161b22; | ||
| --site-soft-surface: #0d1117; | ||
| --site-soft-surface: #161b22; | ||
| --site-inline-code-surface: #161b22; | ||
| --site-inline-code-text: #c9d1d9; | ||
| --ifm-menu-link-sublist-icon-filter: invert(1); | ||
| } | ||
|
|
||
| html, | ||
|
|
@@ -63,6 +64,8 @@ body { | |
| -moz-osx-font-smoothing: grayscale; | ||
| } | ||
|
|
||
| /* ── Navbar ───────────────────────────────────────────────── */ | ||
|
|
||
| .navbar { | ||
| border-bottom: 1px solid var(--site-border); | ||
| box-shadow: none; | ||
|
|
@@ -77,10 +80,14 @@ body { | |
| font-weight: 500; | ||
| } | ||
|
|
||
| /* ── Footer ───────────────────────────────────────────────── */ | ||
|
|
||
| .footer { | ||
| border-top: 1px solid var(--site-border); | ||
| } | ||
|
|
||
| /* ── Sidebar ──────────────────────────────────────────────── */ | ||
|
|
||
| .theme-doc-sidebar-container { | ||
| border-right: 1px solid var(--site-border); | ||
| } | ||
|
|
@@ -92,25 +99,82 @@ body { | |
| font-weight: 500; | ||
| } | ||
|
|
||
| .menu__link:hover { | ||
| background: var(--site-soft-surface); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hover overrides active sidebar link in light modeMedium Severity The new Additional Locations (1) |
||
| } | ||
|
|
||
| .menu__link--active { | ||
| background: rgba(9, 105, 218, 0.1); | ||
| color: var(--ifm-color-primary-dark); | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .menu__list-item-collapsible .menu__link { | ||
| font-weight: 600; | ||
| color: var(--ifm-color-content); | ||
|
Comment on lines
+112
to
+114
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For any category that has a Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| [data-theme='dark'] .menu__link--active { | ||
| background: rgba(47, 129, 247, 0.18); | ||
| color: #c9d1d9; | ||
| } | ||
|
|
||
| /* ── Markdown typography ──────────────────────────────────── */ | ||
|
|
||
| .markdown h1 { | ||
| padding-bottom: 0.3em; | ||
| border-bottom: 1px solid var(--site-border); | ||
| } | ||
|
|
||
| .markdown h2 { | ||
| padding-bottom: 0.3em; | ||
| border-bottom: 1px solid var(--site-border); | ||
| } | ||
|
|
||
| .markdown code { | ||
| background: var(--site-inline-code-surface); | ||
| border: 1px solid var(--site-border); | ||
| border-radius: 6px; | ||
| padding: 0.2em 0.4em; | ||
| font-family: var(--ifm-font-family-monospace); | ||
| color: var(--site-inline-code-text); | ||
| } | ||
|
|
||
| /* ── Blockquotes ──────────────────────────────────────────── */ | ||
|
|
||
| .markdown blockquote { | ||
| border-left: 0.25rem solid var(--site-border); | ||
| color: var(--ifm-color-content-secondary); | ||
| padding: 0 1em; | ||
| margin: 0 0 1rem; | ||
| background: none; | ||
| } | ||
|
|
||
| /* ── Tables ────────────────────────────────────────────────── */ | ||
|
|
||
| .markdown table { | ||
| display: block; | ||
| width: max-content; | ||
| max-width: 100%; | ||
| overflow: auto; | ||
| } | ||
|
|
||
| .markdown th { | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .markdown th, | ||
| .markdown td { | ||
| padding: 0.4rem 0.8rem; | ||
| border: 1px solid var(--site-border); | ||
| } | ||
|
|
||
| .markdown tr:nth-child(2n) { | ||
| background: var(--site-soft-surface); | ||
| } | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /* ── Pagination & misc ────────────────────────────────────── */ | ||
|
|
||
| .pagination-nav__link { | ||
| border: 1px solid var(--site-border); | ||
| border-radius: 8px; | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dark mode soft-surface equals surface, losing hover contrast
Medium Severity
In dark mode,
--site-soft-surfacewas changed to#161b22, which is now identical to--site-surface(#161b22). This eliminates visible hover feedback on.button--secondary:hover(which transitions from--site-surfaceto--site-soft-surface) and the newly added.menu__link:hover(which sets--site-soft-surfaceagainst the sidebar's--ifm-background-surface-color, also#161b22). Both hover states become invisible in dark mode.Additional Locations (1)
prototypes/docusaurus/src/css/custom.css#L101-L104