Hello all,
We have a bug when an image floating left is placed before a list (ol/ul) (see Loading...).
This is leading to results such as what you can see below. The items are overlapping the image.
I’d like to propose three generic options that could solve the problem
Option 1: overflow: auto
overflow: auto
is applied on ol/ul (overflow - CSS: Cascading Style Sheets | MDN)
Before
After
Analysis
The list if not overlapping with the image. But, if the list takes more vertical space than the image, the list is not “flowing” around the image (i.e., the last items are not left aligned, but aligned with the rest of the items)
Option 2: More right margin on images
Before
After
Analysis
This is looking better, but the padding is also applied when the elements aside the image are not lists, meaning that any text will have a noticeable space with the image.
Before
After
Option 3: list-style-position: inside
list-style-position: inside
is applied on ol/ul (list-style-position - CSS: Cascading Style Sheets | MDN)
Before
After
Before with ol
After with ol
Analysis
There too, this is looking better and we preserve the text wrapping the image.
The main cons being what I have highlighted in red. The bullet is now wrapped inside the text, instead of being clearly outside the text.
Conclusion
I’m -1 for Option 1.
I’m +0 for Option 2 as I think it’s preferable we don’t impact the presentation of elements others than ul/li
And +1 for Option 3 as I think it’s acceptable to see bullet points wrapped like this.
WDYT?