From 907c51952faafbcbaa5ec4e2cda7e87229255418 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Fri, 14 Aug 2026 09:34:15 +0800 Subject: [PATCH] fix(css): restore spacing between a block's title and its content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `.blk > .people, .blk > .orgs, … .blk > .table-wrap { margin-top: 12px }` selected a direct child of `.blk`. Block content is wrapped in `
`, so none of those rules have matched since the wrapper was introduced -- they were left pointing at a structure that no longer exists. What survived was the 8px under `.blk h3`, which is a 10.5px uppercase label. A titled block therefore rendered its heading flush against its content: on dsh-index's Agent pages the "Members (5)" label and the first table row read as one run-together line, which is how this was noticed. Titled blocks now get 12px (the h3's own 8px collapses into it), the `details` variant gets the same, and the element rules are re-pointed at `.blk-body` so they select something again. --- xpkgindex/static/css/site.css | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/xpkgindex/static/css/site.css b/xpkgindex/static/css/site.css index def3788..44f6473 100644 --- a/xpkgindex/static/css/site.css +++ b/xpkgindex/static/css/site.css @@ -633,8 +633,17 @@ main.wrap { .blk { margin-top: 34px; } .blk:first-child { margin-top: 0; } -.blk > .people, .blk > .orgs, .blk > .bars, .blk > .avatar-wall, -.blk > .timeline, .blk > .table-wrap { margin-top: 12px; } +/* Block content lives in `.blk-body`, so a rule selecting a direct child of + `.blk` matches nothing. These did, once; the wrapper was introduced later + and they were left pointing at a structure that no longer exists. The + effect was that a titled block had only the h3's 8px under a 10.5px + uppercase label, so the heading and its content read as one run-together + line -- most visible on a table or a list, where the first row sat flush + against the title. */ +.blk > h3 + .blk-body, +.blk > details > .blk-body { margin-top: 12px; } +.blk-body > .people, .blk-body > .orgs, .blk-body > .bars, +.blk-body > .avatar-wall, .blk-body > .timeline { margin-top: 12px; } .blk > details > summary { cursor: pointer; list-style: none; } .blk > details > summary::-webkit-details-marker { display: none; } .blk > details > summary h3 { display: inline; }