LibWeb: Use logical properties in UA stylesheet

This commit is contained in:
Tim Ledbetter 2025-10-24 00:14:25 +01:00 committed by Sam Atkins
parent a056b26e56
commit 5294559f7b
3 changed files with 53 additions and 18 deletions

View File

@ -209,13 +209,11 @@ header, hr, legend, listing, main, p, plaintext, pre, search, xmp {
}
blockquote, figure, listing, p, plaintext, pre, xmp {
margin-top: 1em;
margin-bottom: 1em;
margin-block: 1em;
}
blockquote, figure {
margin-left: 40px;
margin-right: 40px;
margin-inline: 40px;
}
address {
@ -449,43 +447,37 @@ article, aside, :heading, hgroup, nav, section {
}
h1 {
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-block: 0.67em;
font-size: 2.00em;
font-weight: bold;
}
h2 {
margin-top: 0.83em;
margin-bottom: 0.83em;
margin-block: 0.83em;
font-size: 1.50em;
font-weight: bold;
}
h3 {
margin-top: 1.00em;
margin-bottom: 1.00em;
margin-block: 1.00em;
font-size: 1.17em;
font-weight: bold;
}
h4 {
margin-top: 1.33em;
margin-bottom: 1.33em;
margin-block: 1.33em;
font-size: 1.00em;
font-weight: bold;
}
h5 {
margin-top: 1.67em;
margin-bottom: 1.67em;
margin-block: 1.67em;
font-size: 0.83em;
font-weight: bold;
}
h6 {
margin-top: 2.33em;
margin-bottom: 2.33em;
margin-block: 2.33em;
font-size: 0.67em;
font-weight: bold;
}
@ -724,8 +716,7 @@ fieldset {
}
legend {
padding-left: 2px;
padding-right: 2px;
padding-inline: 2px;
}
legend[align=left i] {

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<style>
html {
writing-mode: vertical-rl;
}
blockquote, figure, listing, p, plaintext, pre, xmp {
margin-block: 1em;
}
</style>
<pre>pre</pre>
<xmp>xmp</xmp>
<listing>listing</listing>
<blockquote>blockquote</blockquote>
<figure>figure</figure>
<p>p</p>
<plaintext>plaintext

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=help href="https://html.spec.whatwg.org/multipage/rendering.html#the-css-user-agent-style-sheet-and-presentational-hints">
<link rel=help href="https://issues.chromium.org/issues/407315792">
<link rel=match href="../../../../../expected/wpt-import/html/rendering/the-css-user-agent-style-sheet-and-presentational-hints/pre-margin-block-ref.html">
<!--
This is a test for the following UA style rule in the HTML spec:
blockquote, figure, listing, p, plaintext, pre, xmp {
margin-block: 1em;
}
-->
<style>
html {
writing-mode: vertical-rl;
}
</style>
<pre>pre</pre>
<xmp>xmp</xmp>
<listing>listing</listing>
<blockquote>blockquote</blockquote>
<figure>figure</figure>
<p>p</p>
<plaintext>plaintext