From 03df059048d7ae1ea90a120a761c92742c474ca3 Mon Sep 17 00:00:00 2001 From: DrDrij Date: Thu, 25 Jul 2024 10:37:05 +1000 Subject: [PATCH] Adjust admonition title background specificity to allow proof override 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,