[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"docs:adr\u002F0004-extensions-only-where-css-has-no-way":3},{"versions":4,"version":13,"nav":16,"path":78,"page":80},[5,10],{"name":6,"label":7,"prefix":8,"channel":9},"0.1","0.1.0 (latest)","","latest",{"name":11,"label":12,"prefix":11,"channel":11},"next","next (main)",{"name":6,"label":7,"prefix":8,"channel":9,"base":14,"ref":15},"\u002Fdocs","v0.1.0",[17,21,24,27,30,33,36,39,43,46,49,52,55,58,61,65,68,71,74,77],{"slug":18,"title":19,"group":20},"index","Overview","Guide",{"slug":22,"title":23,"group":20},"getting-started","Getting started",{"slug":25,"title":26,"group":20},"php","PHP API",{"slug":28,"title":29,"group":20},"laravel","Laravel",{"slug":31,"title":32,"group":20},"resources","Resources",{"slug":34,"title":35,"group":20},"deployment","Deployment",{"slug":37,"title":38,"group":20},"troubleshooting","Troubleshooting",{"slug":40,"title":41,"group":42},"css","CSS reference","Reference",{"slug":44,"title":45,"group":42},"paged-media","Paged media",{"slug":47,"title":48,"group":42},"fonts","Fonts",{"slug":50,"title":51,"group":42},"extensions","Extensions",{"slug":53,"title":54,"group":42},"pdf","The PDF",{"slug":56,"title":57,"group":42},"cli","Command line",{"slug":59,"title":60,"group":42},"rust","Rust library",{"slug":62,"title":63,"group":64},"protocol","Worker protocol","Internals",{"slug":66,"title":67,"group":64},"releasing","Releasing",{"slug":69,"title":70,"group":64},"adr\u002F0001-record-architecture-decisions","1. Record architecture decisions",{"slug":72,"title":73,"group":64},"adr\u002F0002-rust-and-fragmentation-in-layout","2. Rust core with fragmentation inside layout",{"slug":75,"title":76,"group":64},"adr\u002F0003-css-parsing-and-own-selector-matching","3. lightningcss for parsing, own selector matching and cascade",{"slug":78,"title":79,"group":64},"adr\u002F0004-extensions-only-where-css-has-no-way","4. Extensions only where CSS has no way",{"title":79,"seoTitle":81,"seoDescription":82,"html":83,"headings":84,"editUrl":95,"sourceUrl":96,"markdownUrl":97,"prev":98},"4. Extensions only where CSS has no way · Fagus docs","Fagus renders CSS as browsers and the print specifications define it. Some documents need things that no CSS specification offers.","\u003Ch1 id=\"4-extensions-only-where-css-has-no-way-with-the--fagus--prefix\">4. Extensions only where CSS has no way, with the \u003Ccode>-fagus-\u003C\u002Fcode> prefix\u003C\u002Fh1>\n\u003Cul>\n\u003Cli>Status: accepted\u003C\u002Fli>\n\u003Cli>Date: 2026-11-03\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"context\">Context\u003Ca class=\"f-doc-anchor\" href=\"#context\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Fagus renders CSS as browsers and the print specifications define it. Some documents need things that no CSS specification offers. The first such need is the carry-over (\u003Cem>Übertrag\u003C\u002Fem>) of German invoices: where the table of positions breaks, a row at the bottom of the page shows the running total (&quot;Continued on page 2 · Carried forward · 612.60 €&quot;), and a row at the top of the next page brings it forward. Named strings (\u003Ccode>string-set\u003C\u002Fcode>, \u003Ccode>string()\u003C\u002Fcode>, CSS GCPM 3) carry such a value into the page margins, but not into a table row. XSL-FO has \u003Ccode>retrieve-table-marker\u003C\u002Fcode> for this; Quittio's mPDF renderer lays the table out twice to insert the rows itself.\u003C\u002Fp>\n\u003Ch2 id=\"decision\">Decision\u003Ca class=\"f-doc-anchor\" href=\"#decision\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>Extensions exist only where CSS has no way to reach the result, and their names start with \u003Ccode>-fagus-\u003C\u002Fcode>, so that they can never clash with a future standard. Browsers ignore them.\u003C\u002Fli>\n\u003Cli>\u003Ccode>@supports\u003C\u002Fcode> knows the extensions, so that a stylesheet can hide what only Fagus can show: \u003Ccode>@supports not (-fagus-repeat: at-break) { … }\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Where an extension needs standard syntax in a place the specifications leave open, Fagus gives it the meaning that follows from the specification: \u003Ccode>string()\u003C\u002Fcode> in the content of an element shows the value the named string has at that point of the document. In a row of a table's header or footer, that point is where the row is placed on each page.\u003C\u002Fli>\n\u003Cli>The first extensions serve the carry-over:\n\u003Cul>\n\u003Cli>\u003Ccode>-fagus-repeat: auto | at-break\u003C\u002Fcode> on a row of the header or footer (or on the row group): with \u003Ccode>at-break\u003C\u002Fcode>, the row shows only where the table breaks, in the header after a break and in the footer before one.\u003C\u002Fli>\n\u003Cli>\u003Ccode>counter(-fagus-next-page)\u003C\u002Fcode> and \u003Ccode>counter(-fagus-previous-page)\u003C\u002Fcode>: the page numbers beside the current one, for &quot;continued on page 3&quot; and &quot;carried forward from page 2&quot;.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fli>\n\u003Cli>The running totals come from the document, for example as \u003Ccode>data-\u003C\u002Fcode> attributes that the code producing the HTML computes. Fagus does not add up numbers: formatting amounts, currencies and rounding belongs to the application.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"consequences\">Consequences\u003Ca class=\"f-doc-anchor\" href=\"#consequences\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>A template with carry-over rows is a standard HTML table plus a few declarations; it renders in browsers without the carry-over rows. Each new extension needs a record like this one, documentation in \u003Ccode>docs\u002Fextensions.md\u003C\u002Fcode> and an entry in \u003Ccode>@supports\u003C\u002Fcode>.\u003C\u002Fp>\n",[85,89,92],{"id":86,"text":87,"level":88},"context","Context",2,{"id":90,"text":91,"level":88},"decision","Decision",{"id":93,"text":94,"level":88},"consequences","Consequences","https:\u002F\u002Fgithub.com\u002Fnforst\u002Ffagus\u002Fedit\u002Fmain\u002Fdocs\u002Fadr\u002F0004-extensions-only-where-css-has-no-way.md","https:\u002F\u002Fgithub.com\u002Fnforst\u002Ffagus\u002Fblob\u002Fv0.1.0\u002Fdocs\u002Fadr\u002F0004-extensions-only-where-css-has-no-way.md","\u002Fdocs\u002Fadr\u002F0004-extensions-only-where-css-has-no-way.md",{"slug":75,"title":76}]