Fix AccordionEditor, ExpandCollapse (#2438)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2022-12-15 08:44:11 +03:00 committed by GitHub
parent 47a94a7590
commit 94cbd80336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 5 deletions

View File

@ -30,12 +30,14 @@ a {
}
&:visited { color: var(--theme-caption-color); }
&.stealth,
&.no-underline {
&:hover, &:active { text-decoration: none; }
}
&.stealth {
display: inline-flex;
align-items: center;
width: 100%;
&:hover, &:active { text-decoration: none; }
}
}
button {

View File

@ -31,7 +31,7 @@
$: tweenedHeight.set(isExpanded ? height : 0, { duration, easing })
</script>
<div class="root" style="height: {$tweenedHeight}px">
<div class="root" style="height: {$tweenedHeight}px" style:overflow={isExpanded ? 'visible' : 'hidden'}>
<div bind:offsetHeight={height} class="flex-no-shrink clear-mins">
<slot />
</div>
@ -39,8 +39,14 @@
<style lang="scss">
.root {
overflow: hidden;
min-height: 0;
flex-shrink: 0;
&::-webkit-scrollbar:vertical {
width: 0;
}
&::-webkit-scrollbar:horizontal {
height: 0;
}
}
</style>

View File

@ -49,6 +49,7 @@
items[index].state = 'opened'
attachments[index].setEditable(true)
attachments[index].setContent(cont)
items[index].content = cont
attachments[index].focus()
break
}

View File

@ -122,7 +122,7 @@
<Button {focusIndex} width={width ?? 'min-content'} {size} {kind} {justify} {showTooltip} on:click={_click}>
<span slot="content" class="overflow-label flex-grow" class:flex-between={showNavigate && selected}>
<div
class="disabled"
class="disabled flex-row-center"
style:width={showNavigate && selected
? `calc(${width ?? 'min-content'} - 1.5rem)`
: `${width ?? 'min-content'}`}