Contributor
These variables are not properly defined when using mkdocstrings on a backstage website.
Contributor Author
@pawamoy to hazard nagging you more. Could you review this as well.
I don't think the test failure in path based tests could be related to this simple css selector change.
Member
Hey @ElementalWarrior, thanks for the PR! Can you explain to me what is this :host variable and why it's required for Backstage? Is it a standard thing, or specific to Backstage? Seems like a harmless change anyway, just want to understand.
Contributor Author
Hey @ElementalWarrior, thanks for the PR! Can you explain to me what is this
:hostvariable and why it's required for Backstage? Is it a standard thing, or specific to Backstage? Seems like a harmless change anyway, just want to understand.
From my understanding, backstage embeds mkdocs in a page using a shadow dom element. And the CSS is just loaded on the page. So the variables in :root don't get picked up.
https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM
Member
OK thanks. I don't know enough of HTML/CSS so I'll trust you on this. We can always revert if this causes any issue ๐
Member
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll just remove the :host occurrences from our own docs.
viktorlashchuk added a commit to viktorlashchuk/mkdocstrings-python that referenced this pull request
Feb 24, 2025