Design: Hidden scrolling for Toasts

This commit is contained in:
Donatas Kirda 2024-05-21 17:19:31 +03:00
parent ffbe9aabd7
commit 1104012abb
Signed by: bloodwiing
GPG Key ID: 63020D8D3F4A164F

View File

@ -10,25 +10,40 @@
<style lang="scss">
.toasts {
display: flex;
flex-flow: column nowrap;
align-items: end;
justify-content: end;
top: calc(100dvh - 16px);
transform: translateY(-100%);
width: max-content;
right: 16px;
gap: 16px;
overflow: hidden;
overflow-y: scroll;
overflow-y: -moz-scrollbars-none;
overflow-x: hidden;
scrollbar-width: none; /* Firefox */
padding: 2px;
position: fixed;
max-height: calc(100dvh - 32px);
z-index: 999;
&::-webkit-scrollbar {
display: none;
}
}
.list {
display: flex;
flex-flow: column nowrap;
align-items: end;
justify-content: end;
width: max-content;
gap: 16px;
height: max-content;
}
</style>
<div role="none" class="toasts" on:mouseenter={() => {expand = true;}} on:mouseleave={() => {expand = false;}}>
{#each $toasts as toast (toast.id)}
<Toast id={toast.id} toast={toast} expand={expand}></Toast>
{/each}
<div class="list">
{#each $toasts as toast (toast.id)}
<Toast id={toast.id} toast={toast} expand={expand}></Toast>
{/each}
</div>
</div>