Standardise menu overlay shadow and add count to relationship cells when hovering

This commit is contained in:
Andrew Kingston 2023-04-18 08:05:13 +01:00
parent 2da07fb90c
commit b21e22071e
2 changed files with 24 additions and 1 deletions

View File

@ -251,6 +251,11 @@
</div> </div>
{/if} {/if}
</div> </div>
{#if value?.length}
<div class="count">
{value?.length || 0}
</div>
{/if}
</div> </div>
{#if isOpen} {#if isOpen}
@ -320,6 +325,8 @@
.container { .container {
min-height: var(--row-height); min-height: var(--row-height);
overflow: hidden; overflow: hidden;
display: flex;
align-items: flex-start;
} }
.focused .container { .focused .container {
overflow-y: auto; overflow-y: auto;
@ -351,6 +358,22 @@
padding: var(--cell-padding); padding: var(--cell-padding);
flex-wrap: wrap; flex-wrap: wrap;
} }
.count {
display: none;
position: absolute;
top: 0;
right: 0;
color: var(--spectrum-global-color-gray-500);
padding: var(--cell-padding) var(--cell-padding) var(--cell-padding) 20px;
background: linear-gradient(
to right,
transparent 0%,
var(--cell-background) 40%
);
}
.wrapper:hover:not(.focused) .count {
display: block;
}
.badge { .badge {
flex: 0 0 auto; flex: 0 0 auto;
padding: 0 var(--cell-padding); padding: 0 var(--cell-padding);

View File

@ -90,6 +90,6 @@
border-radius: 4px; border-radius: 4px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
box-shadow: 0 0 32px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 0 20px -4px rgba(0, 0, 0, 0.15);
} }
</style> </style>