From 51969bf838f76010b045d023b8808a14d9956d45 Mon Sep 17 00:00:00 2001 From: DrDrij Date: Mon, 9 Sep 2024 09:43:54 +1000 Subject: [PATCH] Adjust admonition title background specificity to allow proof override (#248) By changing the way we address the admonition title, we allow the sphinx proof stylesheet to affect background colour when using QuantEcon book theme. --- .../assets/styles/index.scss | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/quantecon_book_theme/assets/styles/index.scss b/src/quantecon_book_theme/assets/styles/index.scss index f5b6c00..e0bc5dc 100644 --- a/src/quantecon_book_theme/assets/styles/index.scss +++ b/src/quantecon_book_theme/assets/styles/index.scss @@ -953,23 +953,6 @@ tt { } } - .admonition { - font-size: 0.9rem; - margin: 1.5rem auto; - padding: 0 1rem 0.5rem 1rem; - page-break-inside: avoid; - box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.1), - 0 0 0.05rem rgba(0, 0, 0, 0.1); - - .admonition-title { - position: relative; - margin: 0 -1rem; - padding: 0.25rem 2rem; - font-weight: 700; - background-color: #0072bc26; - } - } - a.copybtn { top: 0.4em; opacity: 0.2; @@ -1210,6 +1193,22 @@ tt { } } +div.admonition, .admonition { + font-size: 0.9rem; + margin: 1.5rem auto; + padding: 0 1rem 0.5rem 1rem; + page-break-inside: avoid; + box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.1), + 0 0 0.05rem rgba(0, 0, 0, 0.1); + > .admonition-title { + position: relative; + margin: 0 -1rem; + padding: 0.25rem 2rem; + font-weight: 700; + background-color: #0072bc26; + } +} + // Cell-specific controls div.cell { &.container,