ui: show track menu caret outside and visible
cx
This commit is contained in:
1 parent
bcd3ac0456
commit
e45d899437
1 file changed
+16
-11
@@ -292,7 +292,6 @@
|
|||||||
|
|
||||||
{#if isOpen}
|
{#if isOpen}
|
||||||
<div class="menu" bind:this={menuEl} style={menuStyle} use:portal>
|
<div class="menu" bind:this={menuEl} style={menuStyle} use:portal>
|
||||||
<div class="menu-arrow" aria-hidden="true"></div>
|
|
||||||
{#if hasPlayback}
|
{#if hasPlayback}
|
||||||
{#if onPlayNow}
|
{#if onPlayNow}
|
||||||
<button class="menu-item" onclick={() => handleAction(onPlayNow)}>
|
<button class="menu-item" onclick={() => handleAction(onPlayNow)}>
|
||||||
@@ -504,23 +503,29 @@
|
|||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-arrow {
|
/* Caret outside the menu pointing at the trigger */
|
||||||
|
.menu.open-left::after,
|
||||||
|
.menu.open-right::after {
|
||||||
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: var(--arrow-top, 16px);
|
top: var(--arrow-top, 16px);
|
||||||
width: 10px;
|
transform: translateY(-50%);
|
||||||
height: 10px;
|
width: 0;
|
||||||
background: var(--bg-tertiary);
|
height: 0;
|
||||||
transform: translateY(-50%) rotate(45deg);
|
border-top: 7px solid transparent;
|
||||||
|
border-bottom: 7px solid transparent;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.18);
|
filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu.open-left .menu-arrow {
|
.menu.open-left::after {
|
||||||
right: -5px;
|
right: -7px;
|
||||||
|
border-left: 7px solid var(--bg-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu.open-right .menu-arrow {
|
.menu.open-right::after {
|
||||||
left: -5px;
|
left: -7px;
|
||||||
|
border-right: 7px solid var(--bg-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-item {
|
.menu-item {
|
||||||
|
|||||||
Reference in new issue
Block a user