Consistent vertical spacing between page regions — hero, features, testimonials, footer — is one of the most common layout needs, and also one of the easiest to let drift out of sync across a project. Tidgrid addresses this with two purpose-built classes:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sneikki/tidgrid/llms.txt
Use this file to discover all available pages before exploring further.
.tg-section for page sections and .tg-footer for the footer, plus a tg-section-padding modifier that lets you override the padding in one place or toggle it off entirely at any breakpoint.
tg-section
Add.tg-section to any <section> or block element that should have equal vertical breathing room above and below its content. The class applies 3rem of padding on both the top and bottom edges.
html
css
.tg-section only manages vertical padding. It does not add display, flex, or any structural properties — pair it freely with a .tg-container for centering or a .tg-row for columns inside.tg-footer
.tg-footer gives your page footer a slightly asymmetric rhythm: 3rem on top (matching section spacing) and 5rem on the bottom, providing extra clearance at the base of the page — useful for mobile browsers where UI chrome at the bottom can overlap content.
html
css
tg-section-padding modifier
Thetg-section-padding modifier class gives you explicit control over vertical padding without using .tg-section or .tg-footer as the source of truth. It has two variants:
| Class | Effect |
|---|---|
tg-section-padding(default) | Applies padding-top: 3rem; padding-bottom: 3rem (same as .tg-section) |
tg-section-padding(none) | Removes vertical padding: padding-top: 0; padding-bottom: 0 |
Applying default padding explicitly
Usetg-section-padding(default) when you want the standard section spacing but are not using the semantic .tg-section class — for example, on a <div> wrapper that serves as a section but already carries other semantic meaning.
html
Removing padding
tg-section-padding(none) is a utility reset. Use it to strip vertical padding from an element that inherits section spacing — for example, a nested block inside a .tg-section that needs no additional breathing room, or a mobile breakpoint override.
html
Responsive padding modifiers
tg-section-padding supports all five breakpoint prefixes, so you can toggle section spacing contextually across screen sizes. The format is {breakpoint}:tg-section-padding({value}).
html
| Class | Active from |
|---|---|
xs:tg-section-padding(default) | 36em (576 px) |
xs:tg-section-padding(none) | 36em (576 px) |
sm:tg-section-padding(default) | 48em (768 px) |
sm:tg-section-padding(none) | 48em (768 px) |
md:tg-section-padding(default) | 64em (1024 px) |
md:tg-section-padding(none) | 64em (1024 px) |
lg:tg-section-padding(default) | 75em (1200 px) |
lg:tg-section-padding(none) | 75em (1200 px) |
xl:tg-section-padding(default) | 90em (1440 px) |
xl:tg-section-padding(none) | 90em (1440 px) |
Complete page structure example
This example demonstrates how.tg-section, .tg-footer, and .tg-container compose into a full, real-world page skeleton.
html
When to use section vs. not
Use tg-section when…
- You need consistent vertical spacing between page regions
- You’re building a marketing or documentation page with multiple stacked sections
- You want section spacing to be driven by a single SCSS variable across the whole project
- You’re wrapping a
.tg-container+.tg-rowlayout block
Skip tg-section when…
- The element already has padding defined in component-specific styles
- You need tighter or larger padding unique to that element — use custom CSS instead
- The block is an inline or flex child where vertical padding would distort flow
- You’re working inside a card or modal with its own internal spacing system
SCSS customization
Both padding scales are driven by SCSS maps declared with!default in src/layout/section.scss. Override them before importing Tidgrid to apply your spacing consistently across every .tg-section, .tg-footer, and tg-section-padding(default) usage.
scss
scss