Layout classes provide the outer shell for Tidgrid-based pages. While grid classes operate inside flex rows, layout classes establish the page-level structure — centering content withDocumentation 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-container, adding vertical rhythm with tg-section, and padding footers with tg-footer. These classes manage their own responsive behaviour internally and do not use breakpoint prefix variants.
Container Classes
Thetg-container class auto-centers its content using computed margins and enforces a maximum readable width. It maintains a 2rem minimum margin on each side at all viewport sizes, expanding those margins symmetrically as the viewport exceeds the declared maximum width.
The plain .tg-container adapts through all breakpoints automatically. The sized variants pin the container to a specific maximum width immediately, regardless of viewport size.
| Class | Max-Width | Em equivalent |
|---|---|---|
.tg-container | Responsive (scales through all breakpoints) | — |
.tg-container(xs) | 36em | ≈ 576px |
.tg-container(sm) | 48em | ≈ 768px |
.tg-container(md) | 64em | ≈ 1024px |
.tg-container(lg) | 75em | ≈ 1200px |
.tg-container(xl) | 90em | ≈ 1440px |
Section and Footer Classes
Section and footer classes add vertical padding to page sections, ensuring consistent spacing between stacked content blocks.| Class | padding-top | padding-bottom |
|---|---|---|
.tg-section | 3rem | 3rem |
.tg-footer | 3rem | 5rem |
.tg-section-padding(default) | 3rem | 3rem |
.tg-section-padding(none) | 0 | 0 |
.tg-section and .tg-footer elements are static — their padding is always applied and they have no responsive variants. .tg-section-padding(default) and .tg-section-padding(none) are utility variants for applying or resetting section padding on elements that may already carry other styles; these two variants do support responsive breakpoint prefixes (e.g. md:tg-section-padding(none)).
Complete Page Layout Example
This example shows all layout classes working together to form a typical page structure..tg-container, .tg-section, and .tg-footer do not support breakpoint prefix variants — they handle responsive behaviour internally. .tg-section-padding(default) and .tg-section-padding(none) are the exception: they do accept breakpoint prefixes (e.g. md:tg-section-padding(none)).How does tg-container centering work?
How does tg-container centering work?
The container uses a On narrow viewports the
max() function on each margin to guarantee a minimum 2rem gutter, while also centering the element once the viewport exceeds the target width. The formula is:2rem floor kicks in, keeping content readable. On wide viewports the content block sits centred within the declared maximum width.