Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

@left-bottom — page margin box

@left-bottom defines the left / bottom page margin box in paged media; it is generated inside @page rather than matching an element.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

@left-bottom { <declaration-list> }

@left-bottom { <declaration-list> }. The box occupies the left / bottom position on the page perimeter. The rule is valid only inside @page and generates a box only when content is neither normal nor none.

Use it for running heads, footers, section labels, or page counters, not for selecting DOM elements. Edge boxes share their side length with neighboring boxes, while a corner box gets dimensions from the intersecting page margins.

The example nests the rule in @page, sets text and color, then reads the real CSSMarginRule and content descriptor.

Examples

const style = document.createElement('style');
style.textContent = "@page { margin: 20mm; @left-bottom { content: \"left-bottom\"; color: rgb(0, 128, 0); } }";
document.head.append(style);
const pageRule = style.sheet.cssRules[0];
const marginRule = pageRule.cssRules?.[0];
console.log('page=' + pageRule.constructor.name + '; box=' + (marginRule?.constructor.name || 'unsupported') + '; content=' + (marginRule?.style?.content || 'unavailable'));

Result

page=CSSPageRule; box=CSSMarginRule; content="left-bottom"

@left-bottom defines the left / bottom page margin box in paged media; it is generated inside @page rather than matching an element.

Sources