From 31e0b7c6f802cfab7250b7e9dfb321b3889ef6ca Mon Sep 17 00:00:00 2001
From: David Fischer <david@konst.fish>
Date: Sat, 09 Nov 2024 09:44:32 +0000
Subject: [PATCH] feat(comments): conditional display via frontmatter (#1566)

---
 quartz/components/styles/toc.scss |   31 +++++++++++++++++++++++++++----
 1 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/quartz/components/styles/toc.scss b/quartz/components/styles/toc.scss
index 6845812..4988cd8 100644
--- a/quartz/components/styles/toc.scss
+++ b/quartz/components/styles/toc.scss
@@ -1,3 +1,20 @@
+@use "../../styles/variables.scss" as *;
+
+.toc {
+  display: flex;
+  flex-direction: column;
+
+  &.desktop-only {
+    max-height: 40%;
+  }
+}
+
+@media all and not ($mobile) {
+  .toc {
+    display: flex;
+  }
+}
+
 button#toc {
   background-color: transparent;
   border: none;
@@ -28,17 +45,19 @@
 #toc-content {
   list-style: none;
   overflow: hidden;
-  max-height: none;
+  overflow-y: auto;
+  max-height: 100%;
   transition:
-    max-height 0.5s ease,
+    max-height 0.35s ease,
     visibility 0s linear 0s;
   position: relative;
   visibility: visible;
 
   &.collapsed {
+    max-height: 0;
     transition:
-      max-height 0.5s ease,
-      visibility 0s linear 0.5s;
+      max-height 0.35s ease,
+      visibility 0s linear 0.35s;
     visibility: hidden;
   }
 
@@ -61,6 +80,10 @@
       }
     }
   }
+  > ul.overflow {
+    max-height: none;
+    width: 100%;
+  }
 
   @for $i from 0 through 6 {
     & .depth-#{$i} {

--
Gitblit v1.10.0