ladybird icon indicating copy to clipboard operation
ladybird copied to clipboard

LibWeb/CSS: Prevent empty <li> elements from collapsing

Open Chubercik opened this issue 9 months ago • 2 comments

  • Fixes #3762.
  • Added a CSS rule to inject a non-breaking space into empty list items.
  • This ensures proper spacing in lists even when no content is present.

Chubercik avatar Mar 03 '25 12:03 Chubercik

Hi there! Thanks for looking into this.

I don't think this is the right fix though. We shouldn't modify the CSS, as we want it to still work even if the website changes the ::before styling. Instead we're probably doing something wrong while creating the layout tree.

AtkinsSJ avatar Mar 05 '25 11:03 AtkinsSJ

Yeah, that makes sense. I went for the easy approach, might look into it more in-depth in the future, but right now I don't think I can learn ladybird's codebase well enough for that.

Chubercik avatar Mar 05 '25 22:03 Chubercik

No worries! Feel free to ask in the Discord channels if you want some pointers.

AtkinsSJ avatar Mar 06 '25 11:03 AtkinsSJ