You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to happen whenever using the md_in_html extension. It doesn't matter if <figcaption> is used. In dark mode, the content after the figure seems to be pushed down slightly lower compared to light mode.
When inspecting the html, the height of the <p> tag is a bit more in dark mode compared to light mode. I have also tried it with markdown="block", markdown="1" and markdown="span" and it doesn't seem to make a difference.
Create a <figure markdown> element and add the only-light and only-dark images one after another (order doesn't matter, it's always the dark mode content that appears differently)
Thanks for reporting and the excellent reproduction! The problem was induced by a CSS override in the slate theme which set display: initial for #only-dark images in dark mode, setting them into inline display mode (the default). Setting initial might not be the best idea, but setting block might also interfere with author-provided CSS styles.
For this reason, I've refactored the way light and dark mode image modes are toggled in 986cada and moved the overrides under the data-md-color-scheme scope. This way, authors can define images with any display mode while retaining the show/hide functionality.
Context
I want to add light and dark mode images with a common caption so I'm trying to use the md_in_html extension as follows:
Bug description
This seems to happen whenever using the md_in_html extension. It doesn't matter if
<figcaption>
is used. In dark mode, the content after the figure seems to be pushed down slightly lower compared to light mode.When inspecting the html, the height of the
<p>
tag is a bit more in dark mode compared to light mode. I have also tried it withmarkdown="block"
,markdown="1"
andmarkdown="span"
and it doesn't seem to make a difference.Related links
Reproduction
image_bug.zip
Steps to reproduce
<figure markdown>
element and add theonly-light
andonly-dark
images one after another (order doesn't matter, it's always the dark mode content that appears differently)<figcaption>
element<figure>
blockBrowser
No response
Before submitting
The text was updated successfully, but these errors were encountered: