Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get border/padding from fragment when painting background. #46252

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions css/css-page/page-box-007-print-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">
<style>
@page {
size: 400px 800px;
margin: 0;
}
body {
margin: 0;
}
</style>
<div style="box-sizing:border-box; height:100vh; border:solid hotpink; background:yellow; border-width:40px 80px 120px 160px; padding:4px;">
The page padding (in hotpink) should be smallest at the top, larger at the
right, even larger at the bottom, and largest at the left. There should be no
red.
</div>
22 changes: 22 additions & 0 deletions css/css-page/page-box-007-print.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:[email protected]">
<link rel="help" href="https://drafts.csswg.org/css-page-3/#page-properties">
<link rel="match" href="page-box-007-print-ref.html">
<meta name="assert" content="Test percentage-based @page padding">
<style>
@page {
size: 400px 800px;
margin: 0;
padding: 5% 20% 15% 40%;
background: red;
}
body {
margin: 0;
background: hotpink;
}
</style>
<div style="box-sizing:border-box; padding:4px; height:100vh; background:yellow;">
The page padding (in hotpink) should be smallest at the top, larger at the
right, even larger at the bottom, and largest at the left. There should be no
red.
</div>