Skip to content

Give .gallery-cols-5 the width its own pattern implies - #41

Merged
ptr727 merged 1 commit into
developfrom
fix-gallery-cols-5
Aug 7, 2026
Merged

Give .gallery-cols-5 the width its own pattern implies#41
ptr727 merged 1 commit into
developfrom
fix-gallery-cols-5

Conversation

@ptr727

@ptr727 ptr727 commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Follow-up to #40, which found this and deliberately did not fix it. That change claimed to alter no rendered byte — the evidence that a 125-file vendored theme was safely restored to upstream — so a width change had to wait for its own pull request. This is it.

The change

One value in assets/css/extended/custom.css:

 .gallery-cols-5 figure {
-    width: 25%;
+    width: 20%;
 }

The gallery rules are 1/N widths — 100%, 50%, 33.3333333333%, 25%, …, 16.666666666% — and the five-column case repeated the four-column 25%. That is the shape of a copied line rather than a decision.

Correcting the finding's stated impact

The review comment on #40 said this "only allows 4 columns per row", and I repeated that. Checked against the rendered page, it is not observable. Exactly one page passes cols="5", and its gallery is empty:

{{< gallery cols="5" >}}
{{< /gallery >}}

which emits <div class="gallery gallery-cols-5"></div> with no figures inside. No figure anywhere on the site is laid out by this rule.

So this is a latent fix: it is what the next cols="5" gallery will need, not a defect visible today. Shipping it anyway because it is one character and removes a landmine, but the justification is correctness of the rule, not a repaired page.

The empty shortcode is a content artifact from the WordPress import. Left alone — content/ is an imported archive that style sweeps do not reach, per TODO.md.

Verification

  • Rule-level diff of the emitted stylesheet is exactly one line, 25% to 20%, with nothing else in the sheet touched.
  • All 340 built pages differ, and per page the only change is the <link> carrying the stylesheet's fingerprint hash and integrity attribute. That is expected: the sheet is fingerprinted, so any CSS byte rewrites every page's link.
  • Build clean under hugo --gc --minify --panicOnWarning (local Hugo is v0.164.0 extended, the version .github/actions/install-hugo/action.yml pins and SHA256-verifies).
  • URL contract passes: 328/328 golden, 778/778 legacy images, 1012/1012 local assets.
  • themes/PaperMod/ still byte identical to upstream 154d006e.
  • markdownlint and editorconfig-checker clean.

TODO.md loses the Open decisions entry that recorded this, since it is now done.

🤖 Generated with Claude Code

The gallery column rules are 1/N widths: 100%, 50%, 33.3333333333%, 25%,
16.666666666%. The five-column case repeated the four-column 25% rather than
20%, which is the shape of a copied line, not a decision. It arrived with the
original edit to the theme's extended/blank.css slot and moved verbatim in #40,
which claimed to change no rendered byte and so could not correct it.

The rendered effect today is none, and the raised finding overstated it. One
page passes cols="5", and its gallery is empty:

    {{< gallery cols="5" >}}
    {{< /gallery >}}

so it emits <div class="gallery gallery-cols-5"></div> with no figures inside,
and no figure anywhere on the site is laid out by this rule. The five-per-row
claim was not checked against the rendered page before it was repeated. This is
therefore a latent fix: it is what the next cols="5" gallery will need, not a
defect anyone can see now. The empty shortcode is a content artifact from the
WordPress import and is left alone, since content/ is an imported archive that
style sweeps do not reach.

The rule-level diff of the emitted stylesheet is one line, 25% to 20%. Every
built page still differs, because the stylesheet is fingerprinted and each page
carries its hash and integrity attribute; per page that link is the only change.
URL contract passes 328/328, 778/778, 1012/1012. themes/PaperMod/ is still byte
identical to upstream 154d006e.

TODO.md loses the Open decisions entry that recorded this, since it is done.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 7, 2026 01:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the .gallery-cols-5 figure width in the site’s custom PaperMod extension CSS so the five-column gallery rule follows the established 1/N pattern used by the other gallery-cols-* rules, and removes the corresponding “open decision” entry from TODO.md.

Changes:

  • Correct .gallery-cols-5 figure from width: 25% to width: 20% in assets/css/extended/custom.css.
  • Remove the now-resolved .gallery-cols-5 width note from TODO.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
assets/css/extended/custom.css Fixes the five-column gallery width to match the existing 1/N column-width pattern.
TODO.md Removes the tracking item for the .gallery-cols-5 width discrepancy now that it’s addressed.

@ptr727
ptr727 merged commit 43d167b into develop Aug 7, 2026
5 checks passed
@ptr727
ptr727 deleted the fix-gallery-cols-5 branch August 7, 2026 01:22
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