Avoid applying quarto-figure CSS inside html widgets outputs #7849
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR add some
:not()
selectors on the quarto-figure div CSS rule so that it does not apply on div inside html widgets elements.I did use this
with
:nth_child(1)
because it seems we do add some specific div like thisand in fact the CSS rules we have apply on it directly. So I did not test this one, but the child of it. For security I also added the
div.html-widget
part though.@cscheid I see from comment that theses rules are for mermaid and dot
another fix would be to make them more selective toward their mermaid or dot target if they are only for those cases.
Maybe you remember the precise context ?
Hard to add test on this, so I did not but I manually tested and this works.