|
28 | 28 | } |
29 | 29 | } |
30 | 30 |
|
31 | | - // When .active class is applied, change color background of link and utils. The |
32 | | - // !important prevents the focus state to override the active state. |
| 31 | + // !important so :focus-within does not override the active state. |
33 | 32 | &.active { |
34 | | - background-color: var(--color-primary-element) !important; |
| 33 | + background-color: color-mix(in srgb, var(--color-primary-element) 16%, transparent) !important; |
35 | 34 |
|
36 | 35 | &:hover { |
37 | | - background-color: var(--color-primary-element-hover) !important; |
| 36 | + background-color: color-mix(in srgb, var(--color-primary-element) 25%, transparent) !important; |
38 | 37 | } |
39 | 38 |
|
40 | | - // overwrite active text color |
41 | | - .app-navigation-entry-link, .app-navigation-entry-button { |
42 | | - color: var(--color-primary-element-text) !important; |
| 39 | + &:not(.app-navigation-entry--editing) { |
| 40 | + .app-navigation-entry-link, |
| 41 | + .app-navigation-entry-button { |
| 42 | + position: relative; |
| 43 | + color: var(--color-main-text) !important; |
| 44 | + |
| 45 | + &::before { |
| 46 | + content: ''; |
| 47 | + position: absolute; |
| 48 | + inset-block: var(--default-grid-baseline, 4px); |
| 49 | + inset-inline-start: 0; |
| 50 | + width: 3px; |
| 51 | + background-color: var(--color-primary-element); |
| 52 | + border-start-end-radius: 2px; |
| 53 | + border-end-end-radius: 2px; |
| 54 | + animation: nc-nav-stripe-in var(--animation-quick, 200ms) ease-out; |
| 55 | + } |
| 56 | + } |
43 | 57 | } |
44 | 58 | } |
45 | 59 | &:focus-within, |
|
72 | 86 | background-color: var(--color-background-dark) !important; |
73 | 87 | } |
74 | 88 | &.active .app-navigation-entry__actions:hover :deep(.button-vue) { |
75 | | - background-color: var(--color-primary-element) !important; |
| 89 | + background-color: var(--color-primary-element-light-hover) !important; |
76 | 90 | } |
77 | 91 |
|
78 | 92 | /* hide deletion/collapse of subitems */ |
|
227 | 241 | } |
228 | 242 | } |
229 | 243 | } |
| 244 | + |
| 245 | +@keyframes nc-nav-stripe-in { |
| 246 | + from { |
| 247 | + transform: scaleY(0); |
| 248 | + opacity: 0; |
| 249 | + } |
| 250 | + to { |
| 251 | + transform: scaleY(1); |
| 252 | + opacity: 1; |
| 253 | + } |
| 254 | +} |
0 commit comments