Repository navigation
docs: make article headings one step smaller - #1362
Merged
Merged
Conversation
Infima sizes article headings at 3rem (title), 2rem (h2) and 1.5rem (h3), which dominates the page, more so in the dark theme. From 577px up they are now 2.25rem, 1.6rem and 1.3rem; phones keep the theme's smaller sizes. The title rule also covers generated category pages, which duplicate the 3rem title in their own CSS module.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Infima, the CSS framework that Docusaurus ships, enlarges headings inside docs articles to 3rem for the title, 2rem for h2 and 1.5rem for h3. Next to the body text they dominate the page, especially in the dark theme, and more so since the split migration pages (#1361) have many h2 sections.
.plugin-docs header > h1:first-child) also covers the generated category pages. They copy the 3rem title into their own CSS module class (.title_*), so.markdown h1does not reach them.--ifm-hN-font-sizevariables and use Infima's own selectors. They load after Infima and win by source order or specificity.Checks
npm run buildpasses, and the rules are in the bundle after Infima's./code-review: one finding, fixed. h2 and h3 grew on phones, because the overrides applied at every width. All rules are now in onemin-width: 577pxblock./simplify: moved to Infima's selectors and theplugin-docsclass on<html>instead of layout classes (.main-wrapper main), and put everything under one breakpoint instead of the sidebar breakpoint 997px. Nothing to fix for reuse or efficiency./security-review: no findings. The change is static CSS withouturl(),@import, attribute selectors orcontent.