Skip to content

Fix service section grid layouts - #8

Closed
diecasting wants to merge 2 commits into
mainfrom
fix-g1-service-grid
Closed

diecasting wants to merge 2 commits into
mainfrom
fix-g1-service-grid

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.

- assets/css/custom.css: add 36 Tailwind-equivalent utility classes
  (py-12/sm:py-16, grid-cols-1/lg:grid-cols-3, gaps, dark variants, etc.)
  to restore vertical rhythm and card grids on the structured service
  partials. Root cause: the service section partials were added after the
  committed Tailwind v4 compiled main.css was generated (no content scan,
  no CI Tailwind rebuild), so these utilities were absent from the bundle.
- config/_default/params.toml: preserve the previously approved
  showEdit = false (removes visitor-visible edit anchors on service pages).

Scope is intentionally minimal: CSS shim only. No partial/template/content/
SEO/analytics/config changes, and main.css is not recompiled here.

Known limitations (see PR): 28/35 service pages built & verified locally;
die-casting-tooling pages are not built in any language (unverified);
a pre-existing mobile overflow on de/cnc-machining (theme text-4xl) is NOT
addressed by this patch; production is not yet deployed.
@diecasting

Copy link
Copy Markdown
Owner Author

Closing in favor of PR #9. This PR inadvertently bundled PR #7's spacing changes (assets/css/custom.css + config/_default/params.toml) because its head branch was based on feat-service-css-spacing-fix. PR #9 is branched directly off main and contains only the five G1 layout partials, keeping it independent of PR #7.

@diecasting diecasting closed this Oct 14, 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.

1 participant