diff --git a/docs/css/material.css b/docs/css/material.css index 19c6b076..6f86d25a 100644 --- a/docs/css/material.css +++ b/docs/css/material.css @@ -4,7 +4,7 @@ } /* Custom admonition: preview */ -:root { +:root, :host { --md-admonition-icon--preview: url('data:image/svg+xml;charset=utf-8,'); } diff --git a/docs/usage/customization.md b/docs/usage/customization.md index 907809c8..185ea6f8 100644 --- a/docs/usage/customization.md +++ b/docs/usage/customization.md @@ -127,7 +127,7 @@ if it supports light and dark themes, otherwise just override the variables at root level: ```css title="docs/css/mkdocstrings.css" -:root { +:root, :host { --doc-symbol-parameter-fg-color: #df50af; --doc-symbol-attribute-fg-color: #0079ff; --doc-symbol-function-fg-color: #00dfa2; 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;