From fe2e16d937e2b57fb2bb1d10dea47db7256a4a49 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 24 Mar 2025 01:08:07 +0000
Subject: [PATCH] fix: disallow user-select in popover
---
quartz/components/styles/toc.scss | 39 +++++++++++++++++++--------------------
1 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/quartz/components/styles/toc.scss b/quartz/components/styles/toc.scss
index 13d6d3f..bc0c749 100644
--- a/quartz/components/styles/toc.scss
+++ b/quartz/components/styles/toc.scss
@@ -1,8 +1,24 @@
+@use "../../styles/variables.scss" as *;
+
.toc {
- overflow-y: auto;
+ display: flex;
+ flex-direction: column;
+
+ overflow-y: hidden;
+ min-height: 4rem;
+ flex: 0 1 auto;
+ &:has(button.toc-header.collapsed) {
+ flex: 0 1 1.2rem;
+ }
}
-button#toc {
+@media all and not ($mobile) {
+ .toc-header {
+ display: flex;
+ }
+}
+
+button.toc-header {
background-color: transparent;
border: none;
text-align: left;
@@ -29,26 +45,9 @@
}
}
-#toc-content {
+.toc-content {
list-style: none;
- overflow: hidden;
- max-height: none;
- transition:
- max-height 0.5s ease,
- visibility 0s linear 0s;
position: relative;
- visibility: visible;
-
- &.collapsed {
- transition:
- max-height 0.5s ease,
- visibility 0s linear 0.5s;
- visibility: hidden;
- }
-
- &.collapsed > .overflow::after {
- opacity: 0;
- }
& ul {
list-style: none;
--
Gitblit v1.10.0