1
0
Fork 0
firefox/testing/web-platform/tests/css/css-page/cssom/dynamic-001-print.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

23 lines
915 B
HTML

<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
<link rel="help" href="https://drafts.csswg.org/cssom/#the-csspagerule-interface">
<link rel="help" href="https://drafts.csswg.org/css-page-3/">
<link rel="match" href="dynamic-001-print-ref.html">
<style id="sheet">
@page { }
:root {
print-color-adjust: exact;
}
body {
background: green;
}
</style>
<script>
let pageRule = document.getElementById("sheet").sheet.rules[0];
pageRule.insertRule("@top-center { content:'This text should be seen at the top, and there should be a green square below.'; vertical-align:top; }");
pageRule.style.setProperty("margin", "50px 0 0");
pageRule.style.setProperty("border", "solid white");
pageRule.style.setProperty("border-width", "0 300px");
pageRule.style.setProperty("width", "100px");
pageRule.style.setProperty("height", "100px");
</script>