fix(store): give the layanan body the section padding every other page has #87
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/services-spacing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reported: the
/servicesbody spacing does not match the other pages. Measured, and the report is exact.What was wrong
Header bottom to first painted ink, all seven routes, both widths:
//products/products/[slug]/services/[slug]/cart/contact.section/servicesEvery route matched its mockup exactly beforehand, so this was a defect in the approved composition that the port carried over faithfully — not port drift.
Root cause
One missing element.
kontak.htmlopens with<section class="section" style="padding-bottom:var(--s6)">and follows it with apadding-top:0section: the pair reads 44/24 then 0/44 and abuts without doubling.layanan.htmlhad the identicalpadding-top:0second section, but its first block was a bare<div class="container">leaning on an innermargin-bottom. With nothing above paying the top padding, thepadding-top:0that exists to prevent doubling instead collapsed the body against the header — and that 24px margin made layanan the only page whose blocks are separated by a margin rather than by section padding. A double anomaly from a single omission.Fix
At the source, not papered over in the app: the intro in the OpenDesign project is now a
.sectionwithpadding-bottom:var(--s6), the redundant innermargin-bottomis gone, re-vendored toapps/store/design, and mirrored inapp/services/page.tsx./servicesnow measures 44/28 withsection:44px/24pxthensection:0px/44px— byte-for-byte/contact's shape, the right sibling since both are landing pages with no breadcrumb.Checked, not assumed
/opens tighter at 32/24 because.herois a distinct band with its own padding — correct by design./products/[slug]’s 96px bottom padding at 375 is not correct by design, and an earlier version of this PR wrongly said it was. Measured, it is wrong twice: the.sticky-buybar is 69px so 96px over-reserves by 27px, and because the bar isposition: fixedit overlays the viewport bottom rather than the end of.pdp(which at max scroll sits at viewport y -11, off-screen).bodypadding-bottom is 0, so what is actually under the bar is the footer — and two footer links,Kaki-kakiandCara pesan, resolve to the bar’s own price span and CTA button at their own centres. They are untappable.Pre-existing on
main, reproduces in the approved mockup, and.pdp{padding-bottom}is not in this diff — so it is out of scope here and filed as #89.Extra coverage added during review
The tablet band was unmeasured in the first version of this PR. Now covered:
/servicesand/contactare identical at 1440/1121/1120/900/701/700/375, and the breakpoint boundaries are clean (1121→44, 1120→36, 701→36, 700→28) with no off-by-one.A naive "first text ink" metric reads
/services45 vs/contact44. That 1px is line-box half-leading, not spacing:/servicesopens onp.eyebrow(12px font in an 18px line box),/contactonh1(28px in 32.2px). Both sections’ content-box top is 105px. Not a divergence.Verification
layanan.htmlhas no<style>block, sopnpm port-designemits a byte-identicalglobals.css67979330e38616bd3bddc20f9692aeacec9134cc