API reference

page_geometry.cpp · CSS properties

Browse entries grouped by interface file. Expand an entry for declarations, usage and version boundaries.

Read the related guide →

Entries retain declarations and sources. Runtime verification is recorded per entry; internal source candidates are not a promise of SDK delivery.

src/layout/fragmentation/page_geometry.cpp
@page margin
Partial3.61.7C++ / C / Go / Rust

Contributes to the global page content area and available margin strips. The first generic rule without a name or pseudo-class is the base. The first named rule without pseudo-classes whose page name matches consistently across the tree is then overlaid. The ordinary page flow shares one geometry; :first/:left/:right/:blank rules do not change margins per page. The string shorthand recognizes px/in/cm/mm/pt/pc/q. Longhand properties call CSSLength::toPx, with em/rem fixed to a 16px base and vw/vh equal to 0. Percentages have no page-size reference, and calc has no dedicated evaluator.

page_geometry.cpp
<length>{1,4}

Historical audit version: 3.59.0 · 2026-11-01 Asia/Shanghai (UTC+08:00)

Verification scope

Imported static source audit from 2026-11-01 / 3.59.0. References are available; this is not a fresh runtime verification of this release.

src/layout/fragmentation/page_geometry.cpp:200

Report an issue with this entry →
@page margin-bottom
Partial3.61.7C++ / C / Go / Rust

Contributes to the global page content area and available margin strips. The first generic rule without a name or pseudo-class is the base. The first named rule without pseudo-classes whose page name matches consistently across the tree is then overlaid. The ordinary page flow shares one geometry; :first/:left/:right/:blank rules do not change margins per page. The string shorthand recognizes px/in/cm/mm/pt/pc/q. Longhand properties call CSSLength::toPx, with em/rem fixed to a 16px base and vw/vh equal to 0. Percentages have no page-size reference, and calc has no dedicated evaluator.

page_geometry.cpp
<length>

Historical audit version: 3.59.0 · 2026-11-01 Asia/Shanghai (UTC+08:00)

Verification scope

Imported static source audit from 2026-11-01 / 3.59.0. References are available; this is not a fresh runtime verification of this release.

src/layout/fragmentation/page_geometry.cpp:200

Report an issue with this entry →
@page margin-left
Partial3.61.7C++ / C / Go / Rust

Contributes to the global page content area and available margin strips. The first generic rule without a name or pseudo-class is the base. The first named rule without pseudo-classes whose page name matches consistently across the tree is then overlaid. The ordinary page flow shares one geometry; :first/:left/:right/:blank rules do not change margins per page. The string shorthand recognizes px/in/cm/mm/pt/pc/q. Longhand properties call CSSLength::toPx, with em/rem fixed to a 16px base and vw/vh equal to 0. Percentages have no page-size reference, and calc has no dedicated evaluator.

page_geometry.cpp
<length>

Historical audit version: 3.59.0 · 2026-11-01 Asia/Shanghai (UTC+08:00)

Verification scope

Imported static source audit from 2026-11-01 / 3.59.0. References are available; this is not a fresh runtime verification of this release.

src/layout/fragmentation/page_geometry.cpp:200

Report an issue with this entry →
@page margin-right
Partial3.61.7C++ / C / Go / Rust

Contributes to the global page content area and available margin strips. The first generic rule without a name or pseudo-class is the base. The first named rule without pseudo-classes whose page name matches consistently across the tree is then overlaid. The ordinary page flow shares one geometry; :first/:left/:right/:blank rules do not change margins per page. The string shorthand recognizes px/in/cm/mm/pt/pc/q. Longhand properties call CSSLength::toPx, with em/rem fixed to a 16px base and vw/vh equal to 0. Percentages have no page-size reference, and calc has no dedicated evaluator.

page_geometry.cpp
<length>

Historical audit version: 3.59.0 · 2026-11-01 Asia/Shanghai (UTC+08:00)

Verification scope

Imported static source audit from 2026-11-01 / 3.59.0. References are available; this is not a fresh runtime verification of this release.

src/layout/fragmentation/page_geometry.cpp:200

Report an issue with this entry →
@page margin-top
Partial3.61.7C++ / C / Go / Rust

Contributes to the global page content area and available margin strips. The first generic rule without a name or pseudo-class is the base. The first named rule without pseudo-classes whose page name matches consistently across the tree is then overlaid. The ordinary page flow shares one geometry; :first/:left/:right/:blank rules do not change margins per page. The string shorthand recognizes px/in/cm/mm/pt/pc/q. Longhand properties call CSSLength::toPx, with em/rem fixed to a 16px base and vw/vh equal to 0. Percentages have no page-size reference, and calc has no dedicated evaluator.

page_geometry.cpp
<length>

Historical audit version: 3.59.0 · 2026-11-01 Asia/Shanghai (UTC+08:00)

Verification scope

Imported static source audit from 2026-11-01 / 3.59.0. References are available; this is not a fresh runtime verification of this release.

src/layout/fragmentation/page_geometry.cpp:200

Report an issue with this entry →
@page size
Partial3.61.7C++ / C / Go / Rust

PageGeometry parses a single length for a square, two lengths, and named paper sizes; a keyword plus landscape swaps width and height. Bare portrait/landscape and automatic orientation are not implemented. String lengths recognize only px/in/cm/mm/pt/pc/q; calc and relative units are not fully supported. The key limitation is that Document::printToPDF subsequently overwrites pageWidth/pageHeight unconditionally with PDFOptions. The final PDF paper dimensions come from opts. CSS size cannot be claimed to control the output paper size.

page_geometry.cpp
<length>{1,2} | A3 | A4 | A5 | Letter | Legal | [A3|A4|A5|Letter|Legal] [portrait|landscape]

Historical audit version: 3.59.0 · 2026-11-01 Asia/Shanghai (UTC+08:00)

Verification scope

Imported static source audit from 2026-11-01 / 3.59.0. References are available; this is not a fresh runtime verification of this release.

src/layout/fragmentation/page_geometry.cpp:119

Report an issue with this entry →
Browse this reference type →