Skip to content

💄🔧:keep the docs index styles off the docs pages - #1845

Merged
openinf-commit-queue[bot] merged 1 commit into
livefrom
fix/docs-index-scope
Aug 23, 2026
Merged

💄🔧:keep the docs index styles off the docs pages#1845
openinf-commit-queue[bot] merged 1 commit into
livefrom
fix/docs-index-scope

Conversation

@DerekNonGeneric

Copy link
Copy Markdown
Member

docs.liquid gives every page under /docs/ the body class docs, which is
the class the index's own styles read. So the index's resets applied to all
thirteen pages beneath it:

.docs main h1, .docs main h2, .docs main p,
.docs main dl, .docs main dd, .docs main ul { margin: 0 }
.docs main ul { padding: 0; list-style: none }

That is 123 paragraphs, 31 headings and 14 lists rendering with no spacing,
and lists with neither bullets nor indent. The contributing guide, the
commit-message page and the command-line syntax page are the worst hit, being
the longest.

Scoping to main was meant to keep those resets off the navbar and footer,
and it does. It gives no protection against another layout sharing the body
class, because that layout has a main too.

The fix

The index carries docs-index alongside docs, and its stylesheet reads the
new one. docs goes back to meaning only what the navigation uses it for, so
the Docs item still highlights on the index and on every page under it.

Checks

nps test passes, all 17. No rule matches .docs main any more. The index
renders identically: 307 words, 9 handbook rules, 6 marked unwritten, "3 of 9
written", 4 community docs. Nav highlighting confirmed on the index, on a doc
page, and on the home page.

Not in scope

The pages themselves are still on the old shell: deep-page.liquid puts them
in a 48ch column wrapped in .grid, .unit, .four-fifths and .improve,
none of which are styled anywhere. That is a redesign, and it is next.

The index and every page under it carry the same `docs` body class, so
the index's resets reached all thirteen: `margin: 0` on their headings,
paragraphs and lists, and `list-style: none` on the lists. 123
paragraphs, 31 headings and 14 lists rendered without spacing, and the
lists without bullets.

Scoping the resets to `main` was not enough, because the pages have a
`main` of their own. The index now carries `docs-index` as well and its
styles read that, so `docs` means only what the navigation reads it for.

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Claude-Code:claude-opus-5
@netlify

netlify Bot commented Aug 23, 2026

Copy link
Copy Markdown

Deploy Preview for gh-pages-openinf ready!

Name Link
🔨 Latest commit 12f621a
🔍 Latest deploy log https://app.netlify.com/projects/gh-pages-openinf/deploys/6a8a3c50b577db0008fa7234
😎 Deploy Preview https://deploy-preview-1845--gh-pages-openinf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@OpenINFbot OpenINFbot added the commit-queue Land this pull request when its checks pass label Aug 23, 2026
@openinf-commit-queue
openinf-commit-queue Bot merged commit f0c739e into live Aug 23, 2026
15 checks passed
@openinf-commit-queue openinf-commit-queue Bot removed the commit-queue Land this pull request when its checks pass label Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants