diff --git a/src/App.vue b/src/App.vue index 1a6fdf0c4..99a01185d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -12,18 +12,7 @@ > - + + + -.app-navigation-entry-wrapper.drop-over:deep(.app-navigation-entry) { +/* The caption is not an .app-navigation-entry, so it opts into the same drop + hint by its own class. */ +.app-navigation-entry-wrapper.drop-over:deep(.app-navigation-entry), +.app-navigation-caption.drop-over-caption { background-color: var(--color-primary-element-light) !important; outline: 2px dashed var(--color-primary-element); outline-offset: -2px; + border-radius: var(--border-radius-element, var(--border-radius-large)); +} + +/* 22px is the counter bubble's diameter, so this centres a single-digit + bubble under the caption's icon. */ +.app-navigation-entry-wrapper:deep(.app-navigation-entry__utils) { + --counter-inset: calc((var(--default-clickable-area) - 22px) / 2); + position: relative; +} + +.app-navigation-entry-wrapper:deep(.app-navigation-entry__utils .app-navigation-entry__counter-wrapper) { + margin-inline-end: var(--counter-inset); + transition: margin-inline-end var(--animation-quick) ease-in-out; +} + +/* Out of the flow, so revealing it lets the counter animate aside instead of + being displaced instantly. */ +.app-navigation-entry-wrapper:deep(.app-navigation-entry__utils .action-item.app-navigation-entry__actions) { + position: absolute; + inset-inline-end: 0; +} + +.app-navigation-entry-wrapper:not(.category-no-actions):deep(.app-navigation-entry:hover .app-navigation-entry__counter-wrapper), +.app-navigation-entry-wrapper:not(.category-no-actions):deep(.app-navigation-entry:focus-within .app-navigation-entry__counter-wrapper), +.app-navigation-entry-wrapper:not(.category-no-actions):deep(.app-navigation-entry.active .app-navigation-entry__counter-wrapper) { + margin-inline-end: calc(var(--counter-inset) + var(--default-clickable-area)); } -.app-navigation-entry-wrapper.category-no-actions:deep(.app-navigation-entry__counter-wrapper) { - margin-inline-end: calc(var(--default-grid-baseline) * 2 + var(--default-clickable-area)); +@media (prefers-reduced-motion: reduce) { + .app-navigation-entry-wrapper:deep(.app-navigation-entry__utils .app-navigation-entry__counter-wrapper) { + transition: none; + } }