From 5d7bdfcb33ff534557928dd8c44e87524f5746f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Wed, 11 Sep 2024 21:01:56 +0200 Subject: [PATCH] notice: fix code in markdown alerts, take II #906 --- static/css/theme.css | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/css/theme.css b/static/css/theme.css index 9f704b3c4c..7bb588c1b2 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -722,11 +722,13 @@ div.box > .box-content { padding-right: 1rem; } /* remove margin if only a single code block is contained in the tab */ -#R-body .box-content:has(> div.highlight:only-of-type){ +#R-body .box-content:not(:has(> p)):has(> div[class*="highlight"]:only-of-type), +#R-body .box-content:has(> p:empty):has(> div[class*="highlight"]:only-of-type){ padding: 0; } /* remove border from a code block if single */ -#R-body .box-content > div.highlight:only-of-type > pre{ +#R-body .box-content:not(:has(> p)) > div[class*="highlight"]:only-of-type > pre, +#R-body .box-content:has(> p:empty) > div[class*="highlight"]:only-of-type > pre{ border: 0; }