layout: Implement list-style-position quirk (#37837)

In quirks mode, the ::marker of a bare `<li>` should be
`list-style-position: inside`,

Testing: Some WPT improvement

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-07-03 11:16:54 +02:00 committed by GitHub
parent 6dafeb7a59
commit 00472dec8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 44 deletions

View file

@ -42,3 +42,8 @@ input:not([type=image]), textarea { box-sizing: border-box; }
img[align=left i] { margin-right: 3px; }
img[align=right i] { margin-left: 3px; }
/* https://html.spec.whatwg.org/multipage/rendering.html#lists:quirks-mode */
li { list-style-position: inside; }
li :is(dir, menu, ol, ul) { list-style-position: outside; }
:is(dir, menu, ol, ul) :is(dir, menu, ol, ul, li) { list-style-position: unset; }