HTML to PDF browser parity coverage

View Source

This catalog maps documented HTML, CSS, and layout behavior to Chromium comparison fixtures. Each listed fixture must remain within its configured pixel-difference thresholds.

Run the parity suite with:

CHROMIUM_BIN=/usr/bin/chromium mise exec -- mix test.browser_parity

Current result

The suite contains 38 synthetic HTML fixtures and 8 production document fixtures. Guard tests require thresholds for every fixture. Most fixtures allow at most 5% changed pixels. The geometric absolute-positioning fixture allows 1%, and the trim-card fixture allows 5.5% because of subpixel text and border rasterization. Every average channel-delta limit is 5% or lower.

Current status: passing.

New renderer behavior needs focused unit tests. If it changes visible output, add or update a parity fixture before documenting support.

Fixture catalog

FixtureCoverage
absolute_positioning.htmlrelative containing blocks, absolute offsets, percentages, nested positioning, negative and positive z-index, and removal from normal flow
background_images.htmldata URI background images, repeat and no-repeat painting, explicit and zero-sized tiles, cover, positioned backgrounds, and shorthand resets of earlier image state
block_box_model.htmlmargin, padding, width, min-height, side-specific borders, background, border radius, text alignment
border_style_variants.htmlall ten standard border styles, one-to-four-value side styles and colors, and transparent borders
box_sizing_and_margins.htmlbox-sizing, min/max width, percentage width, negative margins, clamped block sizing
break_variants.htmlbreak-before, break-after, page-break-before, page-break-inside, auto and forced break values
css_cascade_selectors.htmluniversal, element, class, id, child, descendant, :first-child, :last-child, :nth-child, !important, forward-referenced custom properties, display: none
generated_content_counters.htmlattribute selectors, :not(), odd/even and type-position selectors, ::before, ::after, attr(), named counter reset/increment/output
css_remaining_supported_values.htmlgrouped selectors, source order, inline style priority, inheritance, inline flex/grid, min(), named colors, no-op overflow/position, side padding/borders, vertical-align, line-break, word-wrap
display_lists_and_inline_block.htmlinline-block layout with inline and block contents, mixed inline/block flow, hidden elements, unordered lists, ordered lists, list item spacing
fonts_and_print_media.htmlordered local CSS @font-face source fallback, print-only media cascade, embedded font output, bundled Unicode glyph fallback from a built-in font
flex_direction_and_justification.htmlflex row, row-reverse, column, grow/shrink/basis, main-axis min/max freezing and redistribution, justify-content, align-items, align-self, row gaps
flex_grid_alignment.htmlflex order, wrapping, gap, alignment, grid template tracks, grid spans, row/column gaps
grid_tracks_and_placement.htmlrepeat(), minmax() growth and minimum-bound overflow, auto rows/columns, grid-column, grid-row, grid-area, item alignment
html_semantics_typography.htmlsemantic block aliases, metadata wrappers, title, lang, h1-h6, b, i, font-relative semantic margins
images_data_uris.html8-bit non-interlaced RGB PNG, JPEG, and SVG data URI images in block, table, flex, and grid contexts
image_object_fitting.htmlreplaced-image sizing, object-fit: contain/cover, percentage object positions, clipping, and image borders
inline_text_flow.htmlinline runs, bold, italic, colors, line-height, wrapping, <br>, text transform
layout_compositions_remaining.htmlgrid containing table, flex containing table, table containing direct flexbox
links_entities_and_protocols.htmllinks, https, http, mailto, named entities, decimal and hex numeric entities, non-breaking-space wrapping
static_form_controls.htmlstatic text inputs, checked and unchecked checkbox/radio state, selected options, multiline textarea content, buttons, Boolean attributes, and CSS-targeted disabled appearance
nested_table_collapsed_borders.htmlcollapsed outer table containing a collapsed inner table, nested colspan, side-specific nested borders, and nested background/border paint order
nested_table_grid_flex.htmltable cell containing grid, grid item containing flexbox, ordering, gaps, nested borders
page_geometry_asymmetric.htmlnamed page sizing, landscape orientation, and asymmetric one-to-four-value @page margins
page_rules_landscape.htmlCSS @page landscape sizing, page margins, explicit page-sized drawing geometry
page_furniture.htmlrepeated header and footer placement inside page margins across multiple pages, including visible current-page and total-page tokens
paragraph_pagination.htmldefault line-level paragraph fragmentation across automatic page breaks
pagination_breaks.htmlexplicit page breaks, repeated page-sized sections, page count parity
table_collapsed_borders.htmltable captions, headers, collapsed borders, side-specific border precedence, colspan, missing trailing cells
table_column_layout.htmlcolgroup, col, column span, percentage column widths, lone cells remaining in their first declared column, table-layout: fixed, and separate/collapsed border-spacing behavior
table_header_near_page_row.htmla repeated table header kept with the first body row when both fit on a fresh page
table_pagination_headers.htmltable overflow pagination, repeated multi-row header expectations, page breaks around table rows
table_rowspan_tfoot.htmlrowspan, tfoot, vertical alignment, footer rows, colspan totals
table_separate_borders.htmlseparate borders, captions, headers, cell padding, colspan, right-aligned table content
text_style_variants.htmlrgb(), rgba() text and backgrounds, transparent text and borders, currentColor, nested custom properties, inherited unitless line height, white-space, word breaking, letter spacing, text transforms
unsupported_glyph_replacement.htmlbrowser-compatible continuation for unsupported text, including C1 controls and private-use glyphs, with deterministic U+FFFD replacement in native output
units_and_sizing.htmlpt, px, mm, cm, in, root-font-relative rem, percentages, aspect-ratio, fixed height, min-height
whitespace_pre_line.htmldefault whitespace collapse, white-space: pre-line, <br>, literal escaped newline text, centered and right-aligned lines

Production fixture catalog

These fixtures mirror production documents and use their production print sizes.

FixtureProduction document typeBrowser parity setting
government_application_form.htmlGovernment-style permit application with static form controlsA4 document size
purchase_order.htmlPurchase order printoutA4 production document size
material_requisition.htmlMaterial requisition printoutA4 production document size
invoice_012.htmlProduction-style invoiceA4 production document size
statement_012.htmlProduction-style account statementA4 production document size
multi_page_report_012.htmlProduction-style multi-page reportA4 production document size
stock_sticker.htmlStock sticker label{4.92126, 1.49606} production label size
trim_card.htmlTrim card printout using the production table, column-group, full-height nested-table, and sheet-break structure{11.6929, 8.2677} production landscape document size

All eight production fixtures currently pass their thresholds.

HTML coverage

FeatureStatusFixtures
doctype, html, head, body, style, meta, titlePassingAll fixtures, html_semantics_typography.html
Block tags: article, aside, div, footer, header, main, nav, section, pPassinghtml_semantics_typography.html, suite-wide block fixtures
Headings h1 through h6Passinghtml_semantics_typography.html
Inline tags: span, strong, b, em, i, a, brPassinginline_text_flow.html, html_semantics_typography.html, links_entities_and_protocols.html
HTML entitiesPassinglinks_entities_and_protocols.html
Lists: ul, ol, liPassingdisplay_lists_and_inline_block.html
Tables: table, caption, colgroup, col, thead, tbody, tfoot, tr, th, tdPassingTable fixtures, especially table_column_layout.html and table_rowspan_tfoot.html
Images: 8-bit non-interlaced RGB/RGBA PNG, JPEG, SVG data URIsPassingimages_data_uris.html
Static controls: text input, checkbox, radio, select/option, textarea, buttonPassingstatic_form_controls.html, government_application_form.html
Attributes: id, class, style, title, role, data-*, aria-*, lang, metadata attributes, href, src, alt, form type/value/name/checked/selected/disabled, column span, cell colspan/rowspan, and header scopePassinggenerated_content_counters.html, css_cascade_selectors.html, html_semantics_typography.html, links_entities_and_protocols.html, images_data_uris.html, static_form_controls.html, table fixtures
Link protocols: https, http, mailtoPassinglinks_entities_and_protocols.html

CSS coverage

FeatureStatusFixtures
Selectors: universal, element, class, id, element/class, attribute presence/equality, descendant, direct child, comma groups, :not(), :root, child position, type position, ::before, ::afterPassinggenerated_content_counters.html, css_cascade_selectors.html, css_remaining_supported_values.html
Generated content and counters: quoted content, attr(), counter(), reset, incrementPassinggenerated_content_counters.html
Cascade: specificity, source order, inline style priority, !important, inheritance, recursively resolved custom properties via var()Passingcss_cascade_selectors.html, css_remaining_supported_values.html, text_style_variants.html
Units: pt, px, root-font-relative rem, mm, cm, in, percentages, unitless 0Passingunits_and_sizing.html, reset rules across fixtures
Display: block, inline, inline-block, none, flex, inline-flex, grid, inline-gridPassingdisplay_lists_and_inline_block.html, css_remaining_supported_values.html, flex/grid fixtures
Box model and painting: width/height, min/max width/height, min(), aspect-ratio, box-sizing, margin, negative margin, padding, side-specific padding, borders, border radius, border collapse, border spacing, table layout, backgrounds, background images, and overflowPassingblock_box_model.html, box_sizing_and_margins.html, background_images.html, css_remaining_supported_values.html, table_column_layout.html, table fixtures
Positioning: static, relative and absolute boxes, inset offsets, containing blocks, and z-index paint orderingPassingabsolute_positioning.html
Text: color, font family/size/weight/style, relative and absolute line-height inheritance, left/center/right alignment, transform, vertical align, line breaking, word breaking, default and pre-line whitespace, letter spacingPassingwhitespace_pre_line.html, inline_text_flow.html, text_style_variants.html, css_remaining_supported_values.html, table fixtures
Colors: hex, named colors, rgb(), rgba(), currentColor, transparentPassingtext_style_variants.html, css_remaining_supported_values.html
Page rules and breaks: @page, @media print, break-before, break-after, page-break-before, page-break-after, page-break-insidePassingpage_geometry_asymmetric.html, page_rules_landscape.html, fonts_and_print_media.html, pagination_breaks.html, break_variants.html
Flexbox subset: direction, wrap, gap, row/column gap, justify/align, order, grow/shrink/basis, main-axis min/max freezing and redistribution, flex, inline flexPassingflex_direction_and_justification.html, flex_grid_alignment.html, css_remaining_supported_values.html
Grid subset: template rows/columns, auto rows/columns, repeat(), minmax() growth and minimum-bound overflow, placement, area, gaps, justify/align items/content/self, inline gridPassinggrid_tracks_and_placement.html, flex_grid_alignment.html, css_remaining_supported_values.html

Layout interaction coverage

InteractionStatusFixtures
Block flow with nested inline textPassinginline_text_flow.html, block_box_model.html
Lists in normal flowPassingdisplay_lists_and_inline_block.html
Table with collapsed bordersPassingtable_collapsed_borders.html
Table with separate bordersPassingtable_separate_borders.html
Table column groups, fixed layout, border spacing, explicit table heights, and percentage-height nested tablesPassingtable_column_layout.html, trim_card.html
Table with colspan, rowspan, tfoot, and missing trailing cellsPassingtable_collapsed_borders.html, table_rowspan_tfoot.html
Table repeated headers and table paginationPassingtable_pagination_headers.html
Nested table inside collapsed tablePassingnested_table_collapsed_borders.html
Table cell containing grid containing flexPassingnested_table_grid_flex.html
Grid containing table, flex containing table, table containing direct flexPassinglayout_compositions_remaining.html
Page breaks around complete blocks, including backgrounds and nested childrenPassingpagination_breaks.html, break_variants.html, trim_card.html
Page breaks inside/around tablesPassingtable_pagination_headers.html
Running headers, footers, and current/total page-number tokens inside page marginsPassingpage_furniture.html
Images inside block/table/flex/gridPassingimages_data_uris.html
Replaced-image contain and cover fitting with clipping and object positioningPassingimage_object_fitting.html
Repeated and fitted background images inside bordered boxesPassingbackground_images.html
Absolute descendants inside relative containing blocks with ordered paintingPassingabsolute_positioning.html
Embedded/system font metrics, Unicode fallback, and unsupported glyph replacement vs ChromiumPassingfonts_and_print_media.html exercises both declared DejaVu Sans and built-in Helvetica text that falls back to bundled DejaVu glyphs; unsupported_glyph_replacement.html exercises visible continuation for unsupported graphemes; production fixtures use their declared font families when registered by the test helper

Summary

Every documented HTML, CSS, and layout area has at least one Chromium fixture, and the suite currently passes. This does not establish full browser compatibility. It checks the behavior this renderer documents. When adding supported behavior, update this catalog and its fixtures, then run mix test.browser_parity.