Jacky Zhao
2025-03-24 aaa5c8e8e40be33aec74c1cf0073ac081cb918fc
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: 4rem;
  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;
@@ -15,21 +35,19 @@
  }
  & .fold {
    margin-left: 0.5rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    opacity: 0.8;
  }
  &.collapsed .fold {
    transform: rotateZ(-90deg)
    transform: rotateZ(-90deg);
  }
}
#toc-content {
.toc-content {
  list-style: none;
  overflow: hidden;
  max-height: none;
  transition: max-height 0.3s ease;
  position: relative;
  & ul {
    list-style: none;
@@ -38,7 +56,9 @@
    & > li > a {
      color: var(--dark);
      opacity: 0.35;
      transition: 0.5s ease opacity;
      transition:
        0.5s ease opacity,
        0.3s ease color;
      &.in-view {
        opacity: 0.75;
      }
@@ -51,4 +71,3 @@
    }
  }
}