-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix variables when used in an embedded window like on backstage #186
Fix variables when used in an embedded window like on backstage #186
Conversation
@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. |
Hey @ElementalWarrior, thanks for the PR! Can you explain to me what is this |
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 |
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 🙂 |
There was a problem hiding this comment.
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.
This is apparently needed when the docs are served under a shadow DOM (for example, Backstage seems to do this, and `:root` variables aren't picked up). See https://developer.mozilla.org/en-US/docs/Web/CSS/:host. PR-186: mkdocstrings/python#186
These variables are not properly defined when using mkdocstrings on a backstage website.