Skip to content

Commit 5294559

Browse files
tcl3AtkinsSJ
authored andcommitted
LibWeb: Use logical properties in UA stylesheet
1 parent a056b26 commit 5294559

File tree

3 files changed

+53
-18
lines changed

3 files changed

+53
-18
lines changed

Libraries/LibWeb/CSS/Default.css

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,11 @@ header, hr, legend, listing, main, p, plaintext, pre, search, xmp {
209209
}
210210

211211
blockquote, figure, listing, p, plaintext, pre, xmp {
212-
margin-top: 1em;
213-
margin-bottom: 1em;
212+
margin-block: 1em;
214213
}
215214

216215
blockquote, figure {
217-
margin-left: 40px;
218-
margin-right: 40px;
216+
margin-inline: 40px;
219217
}
220218

221219
address {
@@ -449,43 +447,37 @@ article, aside, :heading, hgroup, nav, section {
449447
}
450448

451449
h1 {
452-
margin-top: 0.67em;
453-
margin-bottom: 0.67em;
450+
margin-block: 0.67em;
454451
font-size: 2.00em;
455452
font-weight: bold;
456453
}
457454

458455
h2 {
459-
margin-top: 0.83em;
460-
margin-bottom: 0.83em;
456+
margin-block: 0.83em;
461457
font-size: 1.50em;
462458
font-weight: bold;
463459
}
464460

465461
h3 {
466-
margin-top: 1.00em;
467-
margin-bottom: 1.00em;
462+
margin-block: 1.00em;
468463
font-size: 1.17em;
469464
font-weight: bold;
470465
}
471466

472467
h4 {
473-
margin-top: 1.33em;
474-
margin-bottom: 1.33em;
468+
margin-block: 1.33em;
475469
font-size: 1.00em;
476470
font-weight: bold;
477471
}
478472

479473
h5 {
480-
margin-top: 1.67em;
481-
margin-bottom: 1.67em;
474+
margin-block: 1.67em;
482475
font-size: 0.83em;
483476
font-weight: bold;
484477
}
485478

486479
h6 {
487-
margin-top: 2.33em;
488-
margin-bottom: 2.33em;
480+
margin-block: 2.33em;
489481
font-size: 0.67em;
490482
font-weight: bold;
491483
}
@@ -724,8 +716,7 @@ fieldset {
724716
}
725717

726718
legend {
727-
padding-left: 2px;
728-
padding-right: 2px;
719+
padding-inline: 2px;
729720
}
730721

731722
legend[align=left i] {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<style>
3+
html {
4+
writing-mode: vertical-rl;
5+
}
6+
blockquote, figure, listing, p, plaintext, pre, xmp {
7+
margin-block: 1em;
8+
}
9+
</style>
10+
11+
<pre>pre</pre>
12+
<xmp>xmp</xmp>
13+
<listing>listing</listing>
14+
<blockquote>blockquote</blockquote>
15+
<figure>figure</figure>
16+
<p>p</p>
17+
<plaintext>plaintext
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<link rel=author href="mailto:jarhar@chromium.org">
3+
<link rel=help href="https://html.spec.whatwg.org/multipage/rendering.html#the-css-user-agent-style-sheet-and-presentational-hints">
4+
<link rel=help href="https://issues.chromium.org/issues/407315792">
5+
<link rel=match href="../../../../../expected/wpt-import/html/rendering/the-css-user-agent-style-sheet-and-presentational-hints/pre-margin-block-ref.html">
6+
7+
<!--
8+
This is a test for the following UA style rule in the HTML spec:
9+
10+
blockquote, figure, listing, p, plaintext, pre, xmp {
11+
margin-block: 1em;
12+
}
13+
-->
14+
15+
<style>
16+
html {
17+
writing-mode: vertical-rl;
18+
}
19+
</style>
20+
21+
<pre>pre</pre>
22+
<xmp>xmp</xmp>
23+
<listing>listing</listing>
24+
<blockquote>blockquote</blockquote>
25+
<figure>figure</figure>
26+
<p>p</p>
27+
<plaintext>plaintext

0 commit comments

Comments
 (0)