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