Skip to content

list-style-position doesn't seem to work? #1645

Open
@pavpanchekha

Description

I reduced a layout issue on https://herbie.uwplse.org/ to the following code block:

<!doctype html>
<style>
ul {
    width: 1rem;
    border: 1px solid black;
    list-style-position: inside;
}
</style>
<ul>
  <li>Text</li>
</ul>

The Chrome rendering looks like this:

image

The 1rem width is too small to fit the content, which forces the maximum number of line breaks. Because the list has list-style-position: inside, the marker (bullet) is the first inline box in the <li> and therefore the first line is just the bullet and the second line is the word. Here's the standard text:

The marker box is placed as the first inline box in the principal block box, before the element's content and before any
:before pseudo-elements. CSS 2.1 does not specify the precise location of the marker box.

Here's the Ladybird rendering:

image

It's not just a line breaking issue; if I add a second word to the HTML you get this:

image

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcsshas reproWe have a way to reproduce this bug.layoutreduction of web contentIssue has a simplified reduction based on real-world web content.web compatibility

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions