From 24b5b13ee08512c6fa95d918d919544956146854 Mon Sep 17 00:00:00 2001 From: Michael Foley Date: Fri, 13 Mar 2026 16:15:21 -0400 Subject: [PATCH] fix: star admonition icon via custom CSS override The [project.theme.icon.admonition] config alone doesn't render custom admonition icons in Zensical. Added docs/stylesheets/extra.css with the star SVG mask and registered it via extra_css in zensical.toml. --- docs/stylesheets/extra.css | 21 +++++++++++++++++++++ zensical.toml | 1 + 2 files changed, 22 insertions(+) create mode 100644 docs/stylesheets/extra.css diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css new file mode 100644 index 00000000..889198bc --- /dev/null +++ b/docs/stylesheets/extra.css @@ -0,0 +1,21 @@ +/* Custom admonition type: star */ +:root { + --md-admonition-icon--star: url('data:image/svg+xml;charset=utf-8,'); +} + +.md-typeset .admonition.star, +.md-typeset details.star { + border-color: #ffc107; +} + +.md-typeset .star > .admonition-title, +.md-typeset .star > summary { + background-color: rgba(255, 193, 7, 0.1); +} + +.md-typeset .star > .admonition-title::before, +.md-typeset .star > summary::before { + background-color: #ffc107; + -webkit-mask-image: var(--md-admonition-icon--star); + mask-image: var(--md-admonition-icon--star); +} diff --git a/zensical.toml b/zensical.toml index 9733b7e9..4e74b570 100644 --- a/zensical.toml +++ b/zensical.toml @@ -3,6 +3,7 @@ site_name = "CorridorKey" site_description = "Perfect Green Screen Keys" repo_name = "CorridorKey" repo_url = "https://github.com/nikopueringer/CorridorKey" +extra_css = ["stylesheets/extra.css"] nav = [ { Home = "index.md" },