concrete/render/section-root-margin
The section root carries a margin utility, opening a gap between sections.
The section root carries a margin utility, opening a gap between sections.
Graded by the render stage of concrete check, in the render venue. A violation reports this id and the file it failed at — see every rule and concrete check.
Reason
Sections are stacked by the platform, not by you: the artifact is a run of section instances in composition order, and nothing sits between two of them. Zero margin on the root is what lets them butt edge to edge, so a margin utility there opens a gap the person composing the page cannot see the source of and cannot close from the editor. Styling is yours everywhere inside the section; the seam between sections is the platform's.
Fix
Space the content with padding on the root, or with margins on elements inside it. A
section that needs air above it wants pt-*, not mt-*.
Before and after
import { Section, section, Slot, text } from "@homepages/concrete";
export const Hero = section(
{ key: "hero", label: "Hero", slots: { headline: text.medium({ label: "Headline" }) } },
({ slot }) => (
<Section className="my-24 text-center">
<Slot.Text slot={slot.headline} as="h1" />
</Section>
),
);import { Section, section, Slot, text } from "@homepages/concrete";
export const Hero = section(
{ key: "hero", label: "Hero", slots: { headline: text.medium({ label: "Headline" }) } },
({ slot }) => (
<Section className="py-24 text-center">
<Slot.Text slot={slot.headline} as="h1" />
</Section>
),
);