Fix ExpandCollapse (#2463)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2022-12-21 22:45:11 +03:00 committed by GitHub
parent 65dfe64f52
commit 625dff381d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -561,9 +561,11 @@
}
}
}
.formatPanel {
&:focus-within .formatPanel {
position: sticky;
top: 1.25rem;
}
.formatPanel {
margin: -0.5rem -0.25rem 0.5rem;
padding: 0.375rem;
background-color: var(--body-accent);

View File

@ -31,7 +31,11 @@
$: tweenedHeight.set(isExpanded ? height : 0, { duration, easing })
</script>
<div class="root" style="height: {$tweenedHeight}px" style:overflow={isExpanded ? 'visible' : 'hidden'}>
<div
class="root"
style="height: {$tweenedHeight}px;"
style:overflow={$tweenedHeight < height ? 'auto' : $tweenedHeight === 0 ? 'hidden' : 'visible'}
>
<div bind:offsetHeight={height} class="flex-no-shrink clear-mins">
<slot />
</div>