Jump directly to main navigation Jump directly to content

Spacing

Padding and Margin in top, bottom, start, end — can be controlled globally for each content element using the field tx_t3b_spacing.

Seven-point scale (none / xs / s / m / l / xl / xxl) correspond to 0 / 0.25 / 0.5 / 1 / 1.5 / 3 / 6 rem. Values can be overridden via Site Settings (t3bcore.spacing.step.<key>.rem</key>).

The classes t3b-pt-*, t3b-pb-*, t3b-ps-*, t3b-pe-*, t3b-mt-*, t3b-mb-* are automatically applied to the element. The SpacingAssetsMiddleware generates the appropriate CSS at runtime based on the Spacing.yamlconfiguration.

Padding Scale

Seven demo elements, each set to padding_top + padding_bottom . Blue dashed line = element frame (including padding), green = content area. The space between the blue and green lines is the padding.

padding: none

padding: xs · 0.25rem

padding: s · 0.5rem

padding: m · 1 rem

padding: l · 1.5 rem (default)

padding: xl · 3rem

padding: xxl · 6rem

Margin Scale

Margin is outside the element and acts as spacing from neighboring elements. Padding is internal; margin is external.

mt: none, mb: none

mt: s · 0.5rem

mt: m · 1 rem

mt: l · 1.5 rem

mt: xl · 3rem

mt: xxl · 6rem

Sides — top / right / bottom / left

Can be controlled individually for each page. padding_right and padding_left are called on the front end t3b-pe-* (end) and t3b-ps-* (start) on the front end — logically rather than physically, so that RTL layouts work.

Only padding_top: xxl

Only padding_bottom: xxl

Just padding_left: xxl (Start)

Only padding_right: xxl (End)

Backend

In the TYPO3 backend, the field appears as a compact slider in the Appearance → Spacing tab: four padding levels (top/right/bottom/left) and two margin levels (top/bottom), with ± buttons between the seven levels for each axis.

The defaults for each CType are located in EXT:t3b_core/Configuration/Yaml/Spacing.yaml, and project-specific overrides in config/sites/<site>/spacing.yaml</site>. The first and last CEs in a column also receive positional overlays (reset for outer spacing).