|
| 1 | +@use "sass:color"; |
1 | 2 | //Local overrides to the navigation pattern |
2 | 3 | @mixin maas-navigation { |
3 | 4 | $breakpoint-hardware-menu: 1200px; |
|
19 | 20 | display: none; |
20 | 21 | } |
21 | 22 | } |
| 23 | + |
| 24 | + $nav-theme-colors: ( |
| 25 | + "default": $colors--dark-theme--background-default, |
| 26 | + "bark": #585841, |
| 27 | + "sage": #4e5f51, |
| 28 | + "olive": #3d5f11, |
| 29 | + "viridian": #025a3d, |
| 30 | + "prussian_green": #225d5c, |
| 31 | + "blue": #0060bf, |
| 32 | + "purple": #7764d8, |
| 33 | + "magenta": #974097, |
| 34 | + "red": #a71b33, |
| 35 | + ); |
| 36 | + @each $name, $color in $nav-theme-colors { |
| 37 | + .is-maas-#{$name} { |
| 38 | + background-color: $color !important; |
| 39 | + } |
| 40 | + } |
| 41 | + |
| 42 | + @each $name, $color in $nav-theme-colors { |
| 43 | + .is-maas-#{$name}--accent { |
| 44 | + background-color: color.scale($color, $lightness: 5%) !important; |
| 45 | + } |
| 46 | + |
| 47 | + .is-maas-#{$name} { |
| 48 | + .p-side-navigation__link:hover, [aria-current=page].p-side-navigation__link, .p-button--base:hover { |
| 49 | + background-color: color.scale($color, $lightness: 8%) !important; |
| 50 | + } |
| 51 | + |
| 52 | + @media (min-width: $breakpoint-small) { |
| 53 | + .p-side-navigation__item.has-active-child { |
| 54 | + background-color: color.scale($color, $lightness: 8%); |
| 55 | + } |
| 56 | + } |
| 57 | + |
| 58 | + @media (min-width: $application-layout--breakpoint-side-nav-expanded) { |
| 59 | + .p-side-navigation__item.has-active-child { |
| 60 | + background-color: transparent; |
| 61 | + } |
| 62 | + } |
| 63 | + } |
| 64 | + |
| 65 | + .is-maas-#{$name}--accent { |
| 66 | + .p-side-navigation__link:hover, [aria-current=page].p-side-navigation__link { |
| 67 | + background-color: color.scale($color, $lightness: 12%) !important; |
| 68 | + } |
| 69 | + } |
| 70 | + } |
22 | 71 | } |
0 commit comments