From 3b9dba2709a8668e379c6ce1536cb1714971b3f4 Mon Sep 17 00:00:00 2001 From: James McDonnell <447668+ElementalWarrior@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:02:10 -0700 Subject: [PATCH] refactor: Declare default CSS symbol colors under :host as well 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: https://github.com/mkdocstrings/python/pull/186 --- src/mkdocstrings_handlers/python/templates/material/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mkdocstrings_handlers/python/templates/material/style.css b/src/mkdocstrings_handlers/python/templates/material/style.css index 154be85d..9547fa5a 100644 --- a/src/mkdocstrings_handlers/python/templates/material/style.css +++ b/src/mkdocstrings_handlers/python/templates/material/style.css @@ -31,7 +31,7 @@ } /* Symbols in Navigation and ToC. */ -:root, +:root, :host, [data-md-color-scheme="default"] { --doc-symbol-attribute-fg-color: #953800; --doc-symbol-function-fg-color: #8250df;