mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-01 22:48:14 +00:00
fix default callout state
This commit is contained in:
parent
fe2852ff25
commit
92ca787092
4 changed files with 7 additions and 10 deletions
quartz/components/scripts
|
@ -1,7 +1,7 @@
|
|||
function toggleCallout(this: HTMLElement) {
|
||||
const outerBlock = this.parentElement!
|
||||
this.classList.toggle(`is-collapsed`)
|
||||
const collapsed = this.classList.contains(`is-collapsed`)
|
||||
outerBlock.classList.toggle(`is-collapsed`)
|
||||
const collapsed = outerBlock.classList.contains(`is-collapsed`)
|
||||
const height = collapsed ? this.scrollHeight : outerBlock.scrollHeight
|
||||
outerBlock.style.maxHeight = height + `px`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue