classlesscss
classlesscss copied to clipboard
Inline img tags within a p tag doesn't float to the right side
If there is <span> element, then float works.

But If there isn't <span> element, then float doesn't work.

I temporarily fixed it removed :not(:only-child).

Why was this :not(:only-child) selector added?
Thanks for pointing this out. The :not(:only-child) selector was added to be compatible with Markdown converters such as pandoc. If the img is the only child of a paragraph, it most likely indicates a full-width figure and should not float. For the float to work, we would need a selector that also includes text.