|
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. |
33 | | - &.active { |
| 31 | + // !important so :focus-within does not override the active state. |
| 32 | + // New design (NC34+): glassy tinted bg + inline-start stripe. |
| 33 | + &:not(.app-navigation-entry--legacy).active { |
| 34 | + background-color: var(--color-primary-element-light) !important; |
| 35 | + |
| 36 | + &:hover { |
| 37 | + background-color: var(--color-primary-element-light-hover) !important; |
| 38 | + } |
| 39 | + |
| 40 | + &:not(.app-navigation-entry--editing) { |
| 41 | + .app-navigation-entry-link, |
| 42 | + .app-navigation-entry-button { |
| 43 | + color: var(--color-main-text) !important; |
| 44 | + } |
| 45 | + } |
| 46 | + |
| 47 | + &:not(.app-navigation-entry--editing)::before { |
| 48 | + content: ''; |
| 49 | + position: absolute; |
| 50 | + inset-block: calc(var(--default-grid-baseline, 4px) * 2); |
| 51 | + inset-inline-start: 0; |
| 52 | + width: 3px; |
| 53 | + background-color: var(--color-primary-element); |
| 54 | + border-radius: 999px; |
| 55 | + animation: nc-nav-stripe-in var(--animation-quick, 200ms) ease-out; |
| 56 | + } |
| 57 | + } |
| 58 | + |
| 59 | + // Legacy design (NC < 34): solid primary fill. |
| 60 | + &.app-navigation-entry--legacy.active { |
34 | 61 | background-color: var(--color-primary-element) !important; |
35 | 62 |
|
36 | 63 | &:hover { |
37 | 64 | background-color: var(--color-primary-element-hover) !important; |
38 | 65 | } |
39 | 66 |
|
40 | | - // overwrite active text color |
41 | 67 | .app-navigation-entry-link, .app-navigation-entry-button { |
42 | 68 | color: var(--color-primary-element-text) !important; |
43 | 69 | } |
|
46 | 72 | &:hover { |
47 | 73 | background-color: var(--color-background-hover); |
48 | 74 | } |
| 75 | + &:not(.app-navigation-entry--legacy):focus-within, |
| 76 | + &:not(.app-navigation-entry--legacy):hover { |
| 77 | + background-color: color-mix(in srgb, var(--color-primary-element) 8%, transparent); |
| 78 | + } |
49 | 79 | &.active, |
50 | 80 | &:focus-within, |
51 | 81 | &:hover { |
|
71 | 101 | .app-navigation-entry__actions:hover :deep(.button-vue) { |
72 | 102 | background-color: var(--color-background-dark) !important; |
73 | 103 | } |
74 | | - &.active .app-navigation-entry__actions:hover :deep(.button-vue) { |
| 104 | + &:not(.app-navigation-entry--legacy).active .app-navigation-entry__actions:hover :deep(.button-vue) { |
| 105 | + background-color: var(--color-background-dark) !important; |
| 106 | + } |
| 107 | + &.app-navigation-entry--legacy.active .app-navigation-entry__actions:hover :deep(.button-vue) { |
75 | 108 | background-color: var(--color-primary-element) !important; |
76 | 109 | } |
77 | 110 |
|
|
97 | 130 | padding: 0; |
98 | 131 | white-space: nowrap; |
99 | 132 | color: var(--color-main-text); |
| 133 | + font-weight: 500; |
100 | 134 | background-repeat: no-repeat; |
101 | 135 | background-position: $icon-margin center; |
102 | 136 | background-size: $icon-size $icon-size; |
|
228 | 262 | } |
229 | 263 | } |
230 | 264 | } |
| 265 | + |
| 266 | +@keyframes nc-nav-stripe-in { |
| 267 | + from { |
| 268 | + transform: scaleY(0); |
| 269 | + opacity: 0; |
| 270 | + } |
| 271 | + to { |
| 272 | + transform: scaleY(1); |
| 273 | + opacity: 1; |
| 274 | + } |
| 275 | +} |
0 commit comments