Closed genericallyterrible closed 3 months ago
If this helps, for Markdown I somehow got a solution with a pretty straightforward CSS trick:
pluto-output summary > .markdown {
display:inline-flex;
max-width:98%;
}
(see for example here.)
Ended up adding a simple div wrapper for non-string values with this set of styles:
pluto-output div.summary-title {
display: inline-block;
width: calc(100% - 1em);
margin-left: -1em;
padding-left: 1em;
}
summary
was initially restricted toAbstractString
to ensure good default behavior. Non-inline elements would easily create undesirable results an end-user could not remedy other than to only use string-like objects. Here is an example with a long heading:Even MDN demonstrates this issue:
The restriction of only plain string content within
<summary>
elements is not one enforced by specification and so should be removed, provided an updated implementation can deliver a good default behavior for most simple cases.Inspired: https://github.com/JuliaPluto/PlutoUI.jl/pull/290#issuecomment-1959312566