From bb24cd13c7fafbd42d3980c45351a58a76dabb18 Mon Sep 17 00:00:00 2001
From: 1 gal Rosemary <cerasusyedoensis@proton.me>
Date: Sat, 05 Apr 2025 17:39:28 +0000
Subject: [PATCH] fix(css): styles issues with popover, overflow, and scroll overflow (#1907)
---
quartz/components/styles/toc.scss | 57 +++++++++++++++++++++++++++++++++++----------------------
1 files changed, 35 insertions(+), 22 deletions(-)
diff --git a/quartz/components/styles/toc.scss b/quartz/components/styles/toc.scss
index 27ff62a..bf1bc22 100644
--- a/quartz/components/styles/toc.scss
+++ b/quartz/components/styles/toc.scss
@@ -1,4 +1,24 @@
-button#toc {
+@use "../../styles/variables.scss" as *;
+
+.toc {
+ display: flex;
+ flex-direction: column;
+
+ overflow-y: hidden;
+ min-height: 1.2rem;
+ flex: 0 1 auto;
+ &:has(button.toc-header.collapsed) {
+ flex: 0 1 1.2rem;
+ }
+}
+
+@media all and not ($mobile) {
+ .toc-header {
+ display: flex;
+ }
+}
+
+button.toc-header {
background-color: transparent;
border: none;
text-align: left;
@@ -25,30 +45,23 @@
}
}
-#toc-content {
+ul.toc-content {
list-style: none;
- overflow: hidden;
- max-height: none;
- transition: max-height 0.5s ease;
position: relative;
+ margin: 0.5rem 0;
+ padding: 0;
+ height: 5rem;
+ overscroll-behavior: contain;
- &.collapsed > .overflow::after {
- opacity: 0;
- }
-
- & ul {
- list-style: none;
- margin: 0.5rem 0;
- padding: 0;
- & > li > a {
- color: var(--dark);
- opacity: 0.35;
- transition:
- 0.5s ease opacity,
- 0.3s ease color;
- &.in-view {
- opacity: 0.75;
- }
+ list-style: none;
+ & > li > a {
+ color: var(--dark);
+ opacity: 0.35;
+ transition:
+ 0.5s ease opacity,
+ 0.3s ease color;
+ &.in-view {
+ opacity: 0.75;
}
}
--
Gitblit v1.10.0