Skip to content

Commit

Permalink
RFC 173 - Use @page for print refests (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraham authored Feb 6, 2024
1 parent 49a4921 commit b3ad057
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rfcs/page-size.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# RFC 173 - `@page` Rules in Print Tests

[RFC 41](https://github.com/web-platform-tests/rfcs/blob/master/rfcs/print_test.md) added support for print reftests. It specified a fixed page size of "5 inches by 3 inches with 0.5 inch margins on all sides".

CSS allows modifying the size and margins of paginated media using an [`@page` rule](https://developer.mozilla.org/en-US/docs/Web/CSS/@page). Per the letter of the previous RFC these rules would be ignored for wpt tests, making the rule itself impossible to test.

To enable testing different paper sizes and margins, this RFC amends the print reftest support, so that where an `@page` rule is specififed in a test or reference file, it overrides the default paper size when generating the paginated rendering of the document.

0 comments on commit b3ad057

Please sign in to comment.