Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline img tags within a p tag doesn't float to the right side #19

Open
dmitriy-bodroff opened this issue Jun 15, 2022 · 1 comment
Open
Labels
wontfix This will not be worked on

Comments

@dmitriy-bodroff
Copy link

If there is <span> element, then float works.

image

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

image

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

image

Why was this :not(:only-child) selector added?

@dmitriy-bodroff dmitriy-bodroff changed the title Inline img tags within a p tag doesn't float to the right side. Inline img tags within a p tag doesn't float to the right side Jun 15, 2022
@emareg
Copy link
Owner

emareg commented Jun 27, 2022

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.

@emareg emareg added the wontfix This will not be worked on label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants