diff --git a/src/components/TodoTxtItem.vue b/src/components/TodoTxtItem.vue index b93e646..265511e 100644 --- a/src/components/TodoTxtItem.vue +++ b/src/components/TodoTxtItem.vue @@ -1,4 +1,5 @@ @@ -194,26 +205,44 @@ const closeDropdown = () => { @change="toggle" /> - - + {{ task.priority ?? "—" }} - - + - - ({{ p }}) - - - none - - - + + ({{ p }}) + + + — + + + { word-break: break-word; } +.todo-priority { + position: relative; + display: inline-flex; +} + +// Lift the whole priority widget above sibling rows while its menu is open, +// otherwise the absolutely-positioned menu paints behind row N+1's content. +// 1 is enough: no other element in this view sets a non-auto z-index. +.todo-priority--open { + z-index: 1; +} + +.todo-priority-trigger { + border: 0; +} + +.todo-priority-menu { + position: absolute; + top: 100%; + left: 0; + margin-top: 0.25rem; + display: flex; + flex-direction: column; + gap: 0.25rem; + min-width: auto; +} + +.todo-priority-option { + border: 0; + font: inherit; + transition: + transform 120ms ease, + filter 120ms ease; + + &:hover { + filter: brightness(1.1); + transform: scale(1.05); + } + + &:focus-visible { + outline: 2px solid var(--color-primary); + outline-offset: 1px; + } +} + .todo-chip { display: inline-flex; align-items: center;