ebullient/ttrpg-convert-cli

pf2-sidebar size is not accounting Obsidian Sidebars / pf2-note invisible titles

Closed this issue · 1 comments

These are two different problems bound to css issues:

<-- Describe the bug -->
If I have a left and right Obsidian sidebar open, the space left for the non-floating text content beside the floating pf2-sidebar in the editor can become next to nothing.
/
pf2-note Callout titles are invisible.

<-- What was the expected behavior -->
The max-size of the floating pf2-sidebar should be 50% of the Editor window to leave the other 50% for non-floating content.
/
The pf2-note titles should be visible.

<-- What actually happened -->
pf2-sidebar Callout uses 50vw Viewport max-size. Apparently, the Viewport of Obsidian is measured against the whole application window, instead of just the editor window. I have found no setting to change that behavior.
/
pf2-note has a faulty class selector: The .admonition & selector does not work, because the .admonition class is not part of the parent element, but another class of the & itself.

Sources:


/

The first max-width value could be set to % instead of vw. That way, the sidebar would be rendered 50% of the parent element. Since it is unlikely, that a pf2-sidebar callout is nested in another element, other than the editor body or a parent of the full editor width, I think this a viable solution.

The other problem I have tested around and figure a SASS way to select the element via .admonition, BUT the parent element of the callout element has another class, called .admonition-parent. Replacing the .admonition does the trick.