From f31cabbbf9b0d438710618a3edd2a4eaaae09d7d Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 15 Jan 2024 20:37:56 +0000
Subject: [PATCH] fix: dont use default callout title if theres additional title children left (closes #693)
---
quartz/styles/base.scss | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/quartz/styles/base.scss b/quartz/styles/base.scss
index c729656..607749a 100644
--- a/quartz/styles/base.scss
+++ b/quartz/styles/base.scss
@@ -69,6 +69,12 @@
background-color: var(--highlight);
padding: 0 0.1rem;
border-radius: 5px;
+
+ &:has(> img) {
+ background-color: none;
+ border-radius: 0;
+ padding: 0;
+ }
}
}
@@ -94,8 +100,6 @@
}
& article {
- position: relative;
-
& > h1 {
font-size: 2rem;
}
@@ -300,11 +304,13 @@
margin-bottom: 1rem;
}
-div[data-rehype-pretty-code-fragment] {
+figure[data-rehype-pretty-code-figure] {
+ margin: 0;
+ position: relative;
line-height: 1.6rem;
position: relative;
- & > div[data-rehype-pretty-code-title] {
+ & > [data-rehype-pretty-code-title] {
font-family: var(--codeFont);
font-size: 0.9rem;
padding: 0.1rem 0.5rem;
@@ -316,16 +322,17 @@
}
& > pre {
- padding: 0.5rem 0;
+ padding: 0;
}
}
pre {
font-family: var(--codeFont);
- padding: 0.5rem;
+ padding: 0 0.5rem;
border-radius: 5px;
overflow-x: auto;
border: 1px solid var(--lightgray);
+ position: relative;
&:has(> code.mermaid) {
border: none;
@@ -338,6 +345,7 @@
counter-reset: line;
counter-increment: line 0;
display: grid;
+ padding: 0.5rem 0;
& [data-highlighted-chars] {
background-color: var(--highlight);
--
Gitblit v1.10.0