From b3ad057f7bde022c3cc401cad4c9cbb56693efc4 Mon Sep 17 00:00:00 2001 From: jgraham Date: Tue, 6 Feb 2024 16:27:05 +0000 Subject: [PATCH] RFC 173 - Use @page for print refests (#173) --- rfcs/page-size.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 rfcs/page-size.md diff --git a/rfcs/page-size.md b/rfcs/page-size.md new file mode 100644 index 00000000..bbdc3ac1 --- /dev/null +++ b/rfcs/page-size.md @@ -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.