Created
January 26, 2026 20:11
-
-
Save quackbarc/b5a3c577167b8a09e697319248b61720 to your computer and use it in GitHub Desktop.
some CSS for MDN Web Docs that makes the site more readable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Most of these styles were just eyeballed to make spaces and font weights | |
| * look similar to how the pre-redesign (August 2025) had it. | |
| **/ | |
| /* Main layout */ | |
| .left-sidebar, | |
| .reference-toc { | |
| transition: 0.15s opacity; | |
| opacity: 50%; | |
| } | |
| .left-sidebar:hover, | |
| .reference-toc:hover { | |
| opacity: 70%; | |
| } | |
| .reference-layout { | |
| gap: 16px; | |
| margin-top: 16px; | |
| } | |
| .reference-toc li a { | |
| padding: 8px 12px; | |
| } | |
| .reference-layout .reference-layout__header h1, | |
| .content-section h1, | |
| .content-section h2, | |
| .content-section h3, | |
| .content-section h4 { | |
| font-weight: var(--font-weight-bold); | |
| } | |
| @media (width < calc(49rem)) { | |
| .reference-layout { | |
| margin-top: 32px; | |
| } | |
| } | |
| :is(.content-section dl) dd { | |
| margin-left: 2.4em; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment