Skip to content

Fix nested grid widths and button styling bleeding into slider controls - #11

Merged
subwaymatch merged 2 commits into
mainfrom
claude/intelligent-newton-z1bj8m
Sep 17, 2026
Merged

subwaymatch merged 2 commits into
mainfrom
claude/intelligent-newton-z1bj8m

Conversation

@subwaymatch

Copy link
Copy Markdown
Owner

Three layout bugs, all from markup or selectors that outlived the grid they were written for.

Nested columns were numbered against the page grid

typegrid.css sizes every column as a percentage of its own container, so .desktop-3 inside a .desktop-3 .nested column resolved to a quarter of that column rather than a full row.

  • single-illustration-sidebar-left.html (reported) — the three project-info blocks laid out as 75px slivers side by side, so the description wrapped one word per line and the letter-spaced CATEGORY and CLIENT headings overlapped. They now stack down the 300px sidebar.
  • shop.html (reported) — items were 25% of the 9-column area, and the rule above them was 75% of it, which stranded the first product to the right of that rule and broke the float rows. Now a clean three-up grid that matches the .clear hide-under-tablet row breaks already in the markup.
  • Same slip, same fix: single-photography-sidebar-left.html, single-photography-sidebar-right.html, single-architecture-sidebar-right.html (identical sidebars to the reported one), plus contact.html (map squeezed to a quarter width) and shop-item.html (cart summary squeezed, "Add to Cart" wrapping over three lines).

Tablet and phone widths are unchanged — those .nested parents are tablet-12, so their tablet-* and mobile-* numbers already resolved against the full row.

archive-blog.html has the same off-by-a-grid in its post excerpts, but a 675px measure reads better than the full 900px, so it is left alone.

The button skin reached past the slider controls on :hover

The skin was written as a bare element selector, so button:hover (0,1,1) outranked the background: none (0,1,0) that .item-nav and .tf-slider__arrow set for themselves: hovering a project nav item filled the whole cell with accent and made its label unreadable, and the slider arrows disappeared into their own fill. Scoped the skin to .button / a.button — every skinned button in the template already carries the class, including the contact form's submit.

Focus rings on the strip controls

The shared ring is drawn 3px outside the element. On the labelled nav that spilled past the dark panel onto the page; inside the thumbnail strip it was clipped away by the strip's own scrolling box; and in light mode --color-accent-text is too dark to read against the panel. Those two controls now draw a 2px --color-accent ring inset by 2px.

Testing

  • npm test — 2905 checks pass (markup, headers, a11y, behavior, render).
  • Rendered every touched page in Chromium at 1440px and 820px and compared against the previous output; checked hover and focus on the nav strip, thumbnail strip, slider arrows and the contact submit in both colour schemes.

Also added a short note to the README's grid section on how nesting counts, since nothing said.

🤖 Generated with Claude Code

https://claude.ai/code/session_019XKBy19ZHfSkcxXMAwiKUP


Generated by Claude Code

Three related layout bugs, all from markup or selectors that outlived the
grid they were written for.

Nested columns were numbered against the page grid, not their container.
typegrid.css sizes every column as a percentage of its own container, so
`.desktop-3` inside a `.desktop-3 .nested` column resolved to a quarter of
that column, not a full row. The project sidebars laid their three info
blocks out as 75px slivers side by side instead of stacking, the shop grid
squeezed four items into three quarters of the row with the first one
stranded to the right of the rule above it, and the same slip narrowed the
contact map and the shop item's cart summary. Renumbered the children of
every affected `.nested` container out of twelve again. Tablet and phone
widths are unchanged: those parents are `tablet-12`, so their `tablet-*`
and `mobile-*` numbers already resolved against the full row.

The button skin was written as a bare element selector, so `button:hover`
outranked the `background: none` that the slider arrows, the thumbnail
strip and the labelled project nav set for themselves, and filled them
with accent as the pointer passed over. Scoped the skin to `.button` /
`a.button`; every skinned button in the template already carries the class.

Focus rings on those strip controls were drawn 3px outside the control,
which spilled past the dark panel onto the page and was clipped away
entirely inside the thumbnail strip's scrolling box, in a colour too dark
to read against the panel. They now draw a bright accent ring inside the
control.

Also documented how nesting counts in the README, since nothing said.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019XKBy19ZHfSkcxXMAwiKUP
github-actions Bot added a commit that referenced this pull request Sep 17, 2026
@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Preview

https://subwaymatch.github.io/typefolio/pr-11/

Updated for b95617c. It is removed when this pull request closes.

GitHub Pages cannot set response headers, so the _headers file has no effect here.
The CSP and cache rules it declares apply on Cloudflare Pages or Netlify.


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Checks passed

Markup, CSP, accessibility, behaviour and render checks are all green.

Suite Covers
markup tag balance, local links, duplicate ids, image dimensions and alt
headers the CSP in _headers enforced in a real browser on every page
a11y axe-core, every page, two viewports, light and dark
behavior menu, keyboard dropdowns, slider controls, sticky sidebar
render every page at eight widths in both themes

Generated by Claude Code

Typography
- Inter, self-hosted as two subset woff2 files, replaces both the Helvetica
  stack and Roboto Slab. One family sets the whole template, so the
  --font-serif token is gone and the four display rules that used it now
  carry tracking instead. Everything is tracked in slightly, Inter being
  drawn a touch wide at its defaults: --tracking-text on body,
  --tracking-display on the large 300-weight lines.
- Nothing is set below 14px any more. The body clamp now runs 14px to 15px
  and every declaration under 14px was lifted to it, which made the tablet
  override on the nav a no-op; it is gone.
- Every page preloads Inter, since every page renders it. Roboto Slab's
  files and its Apache licence are out, Inter's OFL is in.

Header
- The wordmark is text rather than a 764px PNG: no request, no invert
  filter to survive dark mode, and sharp at any size. It is sized in cqw
  against its own column so it fills the header at every width the way the
  bitmap did, with the ring drawn in CSS.

Menu
- The 01.-04. numbering is out of the markup and the stylesheet.
- Parent items get a Lucide chevron at the right edge of their row, down
  for a submenu below and right for one that opens sideways, drawn as a
  masked icon so it takes the link's own colour. The script no longer
  appends a text arrow, which also means the phone menu is cloned from
  markup that never had one.
- The dropdown has its own surface, --color-menu, a shade off the page
  rather than the black panel it borrowed: near-white with black text in
  light mode, one step up from the page in dark mode. The inverted buttons
  and the skip link keep the dark panel.

Buttons
- The full-width call to action was 86px tall for a 14px label. Padding is
  now sized to the label: 47px for the inline button, 56px for the
  full-width one.

Sliders
- Drag to navigate with a mouse. Touch and trackpad already pan the track,
  so this only takes over for a pointer that cannot: snapping is off for
  the length of the drag, the nearest slide is snapped to on release, and a
  drag that ends on a link does not follow it. The native image drag is
  suppressed, without which the browser swallows the gesture.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019XKBy19ZHfSkcxXMAwiKUP
github-actions Bot added a commit that referenced this pull request Sep 17, 2026
@subwaymatch
subwaymatch merged commit 1415c4a into main Sep 17, 2026
3 checks passed
github-actions Bot added a commit that referenced this pull request Sep 17, 2026
@subwaymatch
subwaymatch deleted the claude/intelligent-newton-z1bj8m branch October 17, 2026 04:19
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