ladybird/Tests/LibWeb/Ref/expected/ol-items-text-ref.html
Jelle Raaijmakers 788d5368a7 LibWeb: Improve list item marker positioning and alpha/roman text
This commit is a three-parter that is hard to separate without breaking
marker rendering:

  1. Any marker style that results in a string, except for a literal
     string (e.g. `list-style-type: "@"`), should get the string ". "
     appended. We forgot to do this for the alpha and roman types.

  2. Instead of using the "pixel size rounded up" from a font and adding
     an arbitrary 1 to that, we now use the exact pixel size for as long
     as possible to improve our vertical positioning of markers.

  3. Instead of always adding a "default marker width" to the marker
     content width, we now only do this if we did not have text metrics
     available (i.e. the marker style is not a text type). This greatly
     improves horizontal positioning of text markers.
2025-07-15 19:05:36 +01:00

8 lines
335 B
HTML

<!DOCTYPE html>
<link rel="match" href="../expected/ol-items-text-ref.html">
<ol>
<li style="list-style-type: 'a. '">Item lower-alpha</li>
<li style="list-style-type: 'B. '">Item upper-alpha</li>
<li style="list-style-type: 'iii. '">Item lower-roman</li>
<li style="list-style-type: 'IV. '">Item upper-roman</li>
</ol>