Skip to content

Fix service section grid layouts - #9

Merged
diecasting merged 2 commits into
mainfrom
fix-g1-only
Oct 14, 2026
Merged

diecasting merged 2 commits into
mainfrom
fix-g1-only

Conversation

@diecasting

Copy link
Copy Markdown
Owner

Summary

Five service-section containers (Materials & Alloys, Manufacturing Process, Equipment & Capacity, Quality & Certifications, Technical Resources) were migrated from Tailwind grid utility classes to the already-existing .hy-grid--2 / .hy-grid--3 classes defined in assets/css/custom.css.

Partial Before After
materials grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 hy-grid hy-grid--3 gap-4
manufacturing-process grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 hy-grid hy-grid--3 gap-4
equipment grid grid-cols-1 gap-4 sm:grid-cols-2 hy-grid hy-grid--2 gap-4
quality-control grid grid-cols-1 gap-8 lg:grid-cols-2 hy-grid hy-grid--2 gap-8
technical-resources grid grid-cols-1 gap-8 lg:grid-cols-2 hy-grid hy-grid--2 gap-8

The mt-8 and gap-4 / gap-8 utilities are intentionally preserved (the .hy-grid base rule defines only display:grid, no gap; the proven related-services reference keeps gap-4).

Root cause

The broken grid was caused by the legacy override rule main .grid { display: block !important; } in assets/css/custom.css, which outranks the compiled .grid { display: grid; } utility (specificity + !important). It was not caused by the absence of .grid { display: grid; } from the compiled CSS bundle — that rule is present and shipped to production.

This is a distinct issue from PR #7, which only restored spacing (py-12), container width (max-w-5xl), dark-mode variants, and grid-cols-* definitions but did not restore display:grid and did not touch the legacy override. Therefore this PR is independent of PR #7.

Verification

  • Local Hugo build (hugo --minify) passes cleanly (exit 0, only .Site.* deprecation warnings).
  • Responsive layout verified by a non-production Playwright probe over the locally built public/ against all five service pages at 375 / 768 / 1440 px (light + dark): every target renders display:grid with the expected item-aware columns (materials/manufacturing-process: 1 / 2 / 3; equipment/quality-control/technical-resources: 1 / 1 / 2), with no container or document horizontal overflow, no bare grid class remaining, and unchanged homepage / related-services grids.
  • Detailed evidence: phaseB_plan/G1_implementation_report.md (machine-readable: g1_local_measure.json, analyze_g1_local.py).

Notes

  • Production deployment has not occurred; this PR is for review only.
  • The equipment section intentionally remains single-column at 768px (the .hy-grid--2 breakpoint is 1024px). This matches the original single-column-at-tablet behavior of quality-control and technical-resources.
  • No CSS, configuration, content, tracking, analytics, or other files were changed — only the five layout partials above.
  • This PR supersedes the earlier PR Fix service section grid layouts #8, which inadvertently bundled PR Fix service-page spacing via CSS shim (custom.css) + preserve showEdit=false #7's spacing changes (custom.css + params.toml); that PR has been closed.

…rids

Follow-up to 21cc47d (PR #9). Replaces gap-8 (absent from compiled
CSS bundle 1eb6d6, so a no-op) with gap-4 (present) on the two service
section grids that still used gap-8, completing the G1 grid repair
without depending on PR #7's CSS shim.
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.

1 participant