mirror of
https://github.com/alrayyes/wiki.git
synced 2025-04-30 06:14:13 +00:00
fix(layout): grid triage and regression (#1440)
* fix(table of contents): multiple scrollbars (https://github.com/jackyzha0/quartz/issues/1388) * fix(center): Main content mininum width (https://github.com/jackyzha0/quartz/issues/1439) * fix(code block): Horizontal overflow fix (https://github.com/jackyzha0/quartz/issues/1438, https://github.com/jackyzha0/quartz/issues/1353) * WIP fix for ul/ol .overflow * Fix: restore former scrollbar behavior for overflow lists (https://github.com/jackyzha0/quartz/issues/1437) * Fix: code block overflow-x * fix: Table of Content overflow (https://github.com/jackyzha0/quartz/issues/1437) * Address feedback * Move max-height toggle from js to css
This commit is contained in:
parent
921f45cf70
commit
a7a0dcad22
6 changed files with 34 additions and 23 deletions
quartz/components/scripts
|
@ -25,7 +25,6 @@ function toggleExplorer(this: HTMLElement) {
|
|||
if (!content) return
|
||||
|
||||
content.classList.toggle("collapsed")
|
||||
content.style.maxHeight = content.style.maxHeight === "0px" ? content.scrollHeight + "px" : "0px"
|
||||
}
|
||||
|
||||
function toggleFolder(evt: MouseEvent) {
|
||||
|
|
|
@ -23,7 +23,6 @@ function toggleToc(this: HTMLElement) {
|
|||
const content = this.nextElementSibling as HTMLElement | undefined
|
||||
if (!content) return
|
||||
content.classList.toggle("collapsed")
|
||||
content.style.maxHeight = content.style.maxHeight === "0px" ? content.scrollHeight + "px" : "0px"
|
||||
}
|
||||
|
||||
function setupToc() {
|
||||
|
@ -32,7 +31,6 @@ function setupToc() {
|
|||
const collapsed = toc.classList.contains("collapsed")
|
||||
const content = toc.nextElementSibling as HTMLElement | undefined
|
||||
if (!content) return
|
||||
content.style.maxHeight = collapsed ? "0px" : content.scrollHeight + "px"
|
||||
toc.addEventListener("click", toggleToc)
|
||||
window.addCleanup(() => toc.removeEventListener("click", toggleToc))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue