Navigation: uCss > Source > Modules > Layout > Section
Modules: Config | Base | Layout | Theming | Typography | Patterns | Utilities
The structural backbone of uCss. Manages full-bleed backgrounds, fluid vertical padding, and robust inner width constraints. A smart 3-tier system β Section > Container > Content β so every page reads the same way.
The Section module is the page skeleton. It handles full-bleed backgrounds, fluid vertical rhythm, and readable inner widths β leaving your content markup clean and semantic.
Section > Container > Content with automatic implicit wrappers β a bare div inside a section becomes the Container.clamp()), no media queries.sc), so nested grids/cards respond to the container, not the viewport.40rem reading column) and macro widths (64β120rem).uCss Sections operate on a smart, nested 3-tier system:
section.s / [data-layout="section"]): the outer shell. Spans the full width, handles background, fluid vertical padding, and establishes a flex-column context..sc / [data-layout="container"] / any direct div child): constrains content with max-inline-size (default 80rem) and centers it. Establishes a container-query context (container: sc / inline-size)..scc / [data-layout="content"] / any div, header, article, aside child of the container): your components flow vertically with responsive gaps and optional reading-width constraints.Implicit Containers: any direct
divinside a section is automatically upgraded to a Container β unless it matches the exclusion list (.unsc,.cvr, overlays, scripts,.block-list-appender). The universal pattern is simplysection.s > div.
Classes are the shorthand. Data attributes keep Structure decoupled from utility/theme.
| Role | Class | Attribute |
|---|---|---|
| Section | .s |
data-layout="section" |
| Container | .sc |
data-layout="container" |
| Content | .scc |
data-layout="content" |
| Recipe | .split, .lock, β¦ |
data-style="split", data-style="lock", β¦ |
<section data-layout="section" data-style="split" class="set dark">
<div data-layout="container">
<header>
<h2 class="tl">Section Title</h2>
</header>
<div>
<p class="tx">Main content goes here...</p>
</div>
</div>
</section>
data-layout="section": "I am the structural shell" (β‘ .s).data-style="split": applies a layout recipe (β‘ .split).class="set dark": theming/utility overrides stay in class.Every scenario shows an Emmet abbreviation β expanded HTML β the classes it maps to. All scenarios use the universal shell section.s > div (the div is the implicit Container).
Emmet: section.s>div
<section class="s"><div>β¦</div></section>
Full-width section, fluid 7β8rem vertical padding, 5%/1.5remβ4rem inline padding, centered 80rem container.
Emmet: section.s.hero.fh>div>(h1+p+div>(a.btn+a.btn.out))
<section class="s hero fh">
<div>
<h1>SEO headline</h1>
<p class="lede">Deck / supporting text</p>
<div class="bns">
<a class="btn">Key CTA</a>
<a class="btn out">Supporting CTA</a>
</div>
</div>
</section>
Why: .hero trims the top padding (hero-appropriate), .fh full-height on shorter viewports, .bns button group, .btn out outlined secondary CTA.
Emmet: section.s>div>(header>(h2+p)+ul.g.g-3>li*3>(strong+span))
<section class="s">
<div>
<header>
<h2>SEO</h2>
<p>Lede</p>
</header>
<ul class="g g-3">
<li><strong>1M+</strong><span>Users</span></li>
<li><strong>99.9%</strong><span>Uptime</span></li>
<li><strong>4.9β
</strong><span>Rating</span></li>
</ul>
</div>
</section>
Why: a ul.g grid gives the numbers row free list-resets and fluid columns. Add .scc--m to the <header> content if you want a tight measure.
Emmet: section.s>div>(header>(h2+p.lede)+ul.g>li.clk*3>article.crd>(h3+p+figure>img)+div>(a.btn+a.btn.out))
<section class="s">
<div>
<header>
<h2>SEO</h2>
<p class="lede">Supporting text</p>
</header>
<ul class="g">
<li class="clk"><article class="crd"><h3>β¦</h3><p>β¦</p><figure><img β¦></figure></article></li>
<li class="clk"><article class="crd"><h3>β¦</h3><p>β¦</p><figure><img β¦></figure></article></li>
<li class="clk"><article class="crd"><h3>β¦</h3><p>β¦</p><figure><img β¦></figure></article></li>
</ul>
<div class="bns"><a class="btn">Key CTA</a><a class="btn out">Supporting CTA</a></div>
</div>
</section>
Why: ul.g auto-fit card grid + .clk clickable rows. Perfect for areas, directions, reasons, reviews.
Emmet: section.s.split>div>(div>(h2+p+p+div>a.btn)+figure>img)
<section class="s split">
<div>
<div>
<h2>SEO</h2>
<p>Title / UVP</p>
<p>Contentβ¦</p>
<div><a class="btn">Key CTA</a></div>
</div>
<figure><img src="β¦" alt="β¦"></figure>
</div>
</section>
Why: .split puts the text and media side-by-side (50/50) on β₯33rem, stacking to one column below. Add div.scc--m to the text side for a reading measure.
Emmet (FAQ): section.s>div>(header>(h2+p)+div>(details.acd*3>(summary+p)))
<section class="s">
<div>
<header><h2>SEO</h2><p>Lede</p></header>
<div>
<details class="acd"><summary>Q1</summary><p>A1</p></details>
<details class="acd"><summary>Q2</summary><p>A2</p></details>
<details class="acd"><summary>Q3</summary><p>A3</p></details>
</div>
</div>
</section>
Form variant: section.s>div>(header>(h2+p)+form>(label>input+label>textarea+button.btn))
Why: details.acd is the built-in accordion recipe; a constrained div.scc--m keeps forms readable.
This Submodule is part of layout.css.
| File | Full (Raw) | Clean | Min | Gzip | Brotli |
|---|---|---|---|---|---|
section/base.css |
3.9 KB | 2.2 KB | 1.9 KB | 1.3 KB | 1.1 KB |
section/container.css |
5.6 KB | 4.0 KB | 3.4 KB | 1.6 KB | 1.3 KB |
section/content.css |
5.9 KB | 5.4 KB | 4.7 KB | 1.2 KB | 1.0 KB |
section/recipes.css |
5.9 KB | 5.5 KB | 4.6 KB | 1.3 KB | 1.2 KB |
Stats reflect the last verified build from
dist/latest. Runnpm run build:latestto regenerate.
Since this is a nested module, it is included in layout.min.css:
<link rel="preconnect" href="https://ucss.unqa.dev">
<link rel="stylesheet" href="https://ucss.unqa.dev/latest/lib/layout.min.css">
| File | Description |
|---|---|
base.css |
Section shell (.s / [data-layout="section"]). Background, fluid padding, flex-column context, full-height/width/bleed modifiers. |
container.css |
Container (.sc / [data-layout="container"] / direct div). Max-width, centering, container: sc, width modifiers. |
content.css |
Content blocks (.scc / [data-layout="content"]). Responsive gaps, width/measure presets, responsive @container sizes. |
recipes.css |
Section recipes: split, lock/sticker, mono/thesis, slab, hero paddings. |
Recipes are opt-in classes (or data-style="β¦") that pre-configure the Section/Container relationship.
Side-by-side: first child left, rest right. Stacks below 33rem.
| Class | Ratio |
|---|---|
.split |
50/50 |
.spread |
β / β |
.horizon, .ledger |
content-driven (first item 32rem basis) |
Two-column grid (β₯66rem); the first child becomes position: sticky and pins while the rest scrolls.
<section class="s lock">
<div>
<header><h2>I follow you</h2></header>
<div class="g g-2">β¦scrolling contentβ¦</div>
</div>
</section>
Narrow, centered, focused text (64rem max, centered alignment).
Left-aligned reading column (56rem); .frieze/.hand/.thesis tighten to 48rem.
| Class | Effect |
|---|---|
.hero |
reduced top padding (hero-appropriate) |
.heroism |
even tighter top padding |
.heroin / .hero.transparent |
reserves header height (---xe + ---hm) for transparent headers |
| Class | Effect |
|---|---|
.fh / .fs / .fvh |
full-height (min-height 100svh on viewports β€ 64rem tall) |
.fw / .fs / .fvw |
full width |
.fsz |
full-bleed (zero inline padding) |
| Class | Max width | Best for |
|---|---|---|
.sc (default) |
80rem (1280px) |
standard content |
.sc--xs / .c-xs |
64rem (1024px) |
forms, login |
.sc--s / .c-s |
70rem (1120px) |
narrow |
.sc--m / .c-m |
80rem (1280px) |
default |
.sc--l / .c-l |
85rem (1360px) |
apps |
.sc--xl / .c-xl |
90rem (1440px) |
wide dashboards |
.sc--xxl / .sc--2xl / .c-2xl |
100rem (1600px) |
expansive tables/galleries |
.sc--xxxl / .sc--3xl / .c-3xl |
120rem (1920px) |
ultra-wide |
.sc--f / .c-f |
100% |
full-bleed content |
.sc--a4 / .a4 Β· .sc--a4x / .a4x |
210mm Β· 297mm |
|
.mq--xs / --sm / --md / --lg |
23 / 33 / 66 / 88rem |
viewport-derived widths |
.cq--xs / --sm / --md / --lg |
20 / 30 / 60 / 80rem |
container-derived widths |
| Class | Max width | Best for |
|---|---|---|
.scc--xxs / .ct-2xs |
20rem |
microcopy |
.scc--xs / .ct-xs |
24rem |
disclaimers |
.scc--s / .ct-s |
32rem |
sidebars, secondary info |
.scc--m / .ct-m |
40rem |
optimal reading line-length (prose) |
.scc--l / .ct-l |
48rem |
larger intro/thesis |
.scc--xl / .ct-xl |
56rem |
generous text blocks |
.scc--2xl / .scc--xxl / .c-xs |
64rem |
massive text arrays |
.scc--3xl / .scc--xxxl / .c-s |
70rem |
wide arrays |
.scc--ch-xs / --ch-s / --ch-m / --ch-l |
24 / 40 / 64 / 80ch |
character-based measure |
Section vertical padding is fluid by default (---3xg, β 7β8rem). Override per section:
<section class="s" style="--s-pb: 4rem;">β¦</section>
<section class="s" style="--s-pbs: 3rem; --s-pbe: 5rem;">β¦</section>
| Variable | Controls |
|---|---|
--s-pb |
padding-block (both) |
--s-pbs |
padding-block-start (top) |
--s-pbe |
padding-block-end (bottom) |
--s-pi / --s-pis / --s-pie |
padding-inline (left/right) |
--s-g / --s-rg / --s-cg |
gap (row / column) |
For hero sections, use the .hero / .heroism / .heroin recipes instead of hand-tuning.
The
.pb--*utilities (padding module) apply to generic elements, not the section shell β use--s-pb*here.
All Section behavior is driven by CSS variables.
--s-*) β section.s| Variable | Default | Description |
|---|---|---|
--s-bg |
none |
background |
--s-pb / --s-pbs / --s-pbe |
---3xg (β 7β8rem, fluid) |
padding-block |
--s-pi / --s-pis / --s-pie |
--p5f (clamp(1.5rem, 5%, 4rem)) |
padding-inline |
--s-g / --s-rg / --s-cg |
---xg (β 5β6rem, fluid) |
gap |
--s-d |
flex |
display |
--s-fxd |
column |
flex-direction |
--s-fxw |
nowrap |
flex-wrap |
--s-ai |
center |
align-items |
--s-is / --s-w |
100% |
inline-size |
--sc-*) β .sc| Variable | Default | Description |
|---|---|---|
--sc-maw |
--c-m (80rem) |
max-inline-size |
--sc-rg |
---xe (β 3β3.5rem) |
row gap |
--sc-cg |
---2xe (β 3.5β4rem) |
column gap |
--sc-d |
flex |
display |
--sc-fxd |
column |
flex-direction |
--sc-fxw |
nowrap |
flex-wrap |
--sc-ai |
stretch |
align-items |
--sc-fxg / --sc-fxs / --sc-fxb |
0 / 1 / auto |
flex grow/shrink/basis |
--sc-is / --sc-w |
100% |
inline-size |
Container-query context: container: sc / inline-size.
--scc-*) β .scc| Variable | Default | Description |
|---|---|---|
--scc-rg |
---s (β 1β1.25rem) |
row gap |
--scc-cg |
---xe (β 3β3.5rem) |
column gap |
--scc-d |
flex |
display |
--scc-fxd |
column |
flex-direction |
--scc-fxw |
wrap |
flex-wrap |
--scc-w |
100% |
inline-size |
--scc-maw |
auto |
max-inline-size (use .scc--m etc.) |
--scc-ai / --scc-jc / --scc-ac |
unset | alignment (user-set) |
Navigation: uCss > Source > Modules > Layout > Section
Modules: Config | Base | Layout | Theming | Typography | Patterns | Utilities
License: MPL-2.0 Copyright: Β© 2026 Shukhrat (Alive π) β€» UNQA
src/lib/
βββ config/ # 1. CONFIGURATION (The Brain)
β βββ root/ # - Semantic Modules
β β βββ colors.css # - Palettes & Themes
β β βββ typography.css # - Fonts & Scales
β β βββ layout.css # - Radius & Spacing
β β βββ patterns.css # - Component Vars
β βββ adapters/ # - CMS Adapters
β β βββ blocksy.css # - Blocksy Theme
β β βββ gutenberg.css # - WordPress Block Editor
β βββ root.css # - Entry Point
β
βββ base/ # 2. BASE (The Foundation)
β βββ html/ # - HTML Engine
β β βββ reset.css # - Normalization
β β βββ typography.css # - Text Defaults
β β βββ flow.css # - Smart Flow Engine
β β βββ lists.css # - List Styles
β β βββ forms.css # - Input Styling
β β βββ helpers.css # - HTML Utilities
β βββ html.css # - Entry Point
β
βββ layout/ # 3. LAYOUT (The Skeleton)
β βββ grid/ # - Grid Engine
β βββ flex/ # - Flex Engine
β βββ section/ # <== YOU ARE HERE
β β βββ base.css # - Section shell (.s)
β β βββ container.css # - Container (.sc) & width modifiers
β β βββ content.css # - Content blocks (.scc) & measures
β β βββ recipes.css # - Split / Lock / Hero recipes
β βββ query.css # - Container Query Helper (.cq / .cquery)
β
βββ patterns/ # 4. PATTERNS (The Components)
β βββ button/
β βββ card/
β βββ ...
β
βββ theming/ # 5. THEMING (The Skin)
β βββ set/
β βββ ...
β
βββ typography/ # 6. TYPOGRAPHY (The Voice)
β βββ title.css
β βββ text.css
β βββ controls/
β
βββ utilities/ # 7. UTILITIES (The Tools)
βββ display.css
βββ position.css
βββ size.css
βββ ...