| 1 |
$menu-item-font-size: $eps-font-size-caption; |
| 2 |
$menu-item-line-height: $eps-line-height-sm; |
| 3 |
$menu-item-link-spacing: spacing(12); |
| 4 |
$menu-item-icon-size: $font-size-18; |
| 5 |
$menu-item-padding-y: spacing(8); |
| 6 |
$menu-item-padding-x: spacing(30); |
| 7 |
$menu-item-height: spacing(44); |
| 8 |
$menu-item-pointer-width: spacing(5); |
| 9 |
$menu-item-pointer-color: theme-elements-colors(link-color); |
| 10 |
$menu-item-action-button-padding: spacing(10); |
| 11 |
$menu-item-action-button-margin: spacing(20); |
| 12 |
$menu-item-action-button-color: tints(300); |
| 13 |
|
| 14 |
$menu-item-active-box-shadow: $eps-box-shadow; |
| 15 |
$menu-item-transition: $eps-transition-duration; |
| 16 |
|
| 17 |
$menu-item-color: tints(600); |
| 18 |
$menu-item-color-hover: tints(700); |
| 19 |
$menu-item-background-color-active: theme-colors(light); |
| 20 |
$menu-item-icon-color: tints(500); |
| 21 |
|
| 22 |
:root { |
| 23 |
--menu-item-color: #{$menu-item-color}; |
| 24 |
--menu-item-color-hover: #{$menu-item-color-hover}; |
| 25 |
--menu-item-background-color-active: #{$menu-item-background-color-active}; |
| 26 |
--menu-item-icon-color: #{$menu-item-icon-color}; |
| 27 |
--menu-item-action-button-color: #{$menu-item-action-button-color}; |
| 28 |
} |
| 29 |
|
| 30 |
$menu-item-dark-color: dark-tints(100); |
| 31 |
$menu-item-dark-color-hover: dark-tints(100); |
| 32 |
$menu-item-dark-background-color-active: dark-tints(600); |
| 33 |
$menu-item-icon-dark-color: dark-tints(200); |
| 34 |
$menu-item-action-button-dark-color: dark-tints(400); |
| 35 |
|
| 36 |
.eps-theme-dark { |
| 37 |
--menu-item-color: #{$menu-item-dark-color}; |
| 38 |
--menu-item-color-hover: #{$menu-item-dark-color-hover}; |
| 39 |
--menu-item-background-color-active: #{$menu-item-dark-background-color-active}; |
| 40 |
--menu-item-icon-color: #{$menu-item-icon-dark-color}; |
| 41 |
--menu-item-action-button-color: #{$menu-item-action-button-dark-color}; |
| 42 |
} |
| 43 |
|
| 44 |
.#{$eps-prefix}menu-item { |
| 45 |
display: flex; |
| 46 |
align-items: center; |
| 47 |
position: relative; |
| 48 |
transition: $menu-item-transition; |
| 49 |
--action-button-opacity: 0; |
| 50 |
|
| 51 |
&::before { |
| 52 |
content: ''; |
| 53 |
display: block; |
| 54 |
position: absolute; |
| 55 |
top: 0; |
| 56 |
inset-inline-start: 0; |
| 57 |
height: 100%; |
| 58 |
width: var(--menu-item-pointer-width); |
| 59 |
background-color: $menu-item-pointer-color; |
| 60 |
} |
| 61 |
|
| 62 |
&:hover { |
| 63 |
--action-button-opacity: 1; |
| 64 |
} |
| 65 |
|
| 66 |
&:hover, &--active { |
| 67 |
--menu-item-color: var(--menu-item-color-hover); |
| 68 |
--eps-link-color: var(--menu-item-color-hover); |
| 69 |
--menu-item-icon-color: #{$menu-item-pointer-color}; |
| 70 |
} |
| 71 |
|
| 72 |
&--active { |
| 73 |
background-color: var(--menu-item-background-color-active); |
| 74 |
} |
| 75 |
|
| 76 |
&__link { |
| 77 |
padding: $menu-item-padding-y $menu-item-padding-x; |
| 78 |
min-height: $menu-item-height; |
| 79 |
font-size: $menu-item-font-size; |
| 80 |
line-height: $menu-item-line-height; |
| 81 |
flex-grow: 1; |
| 82 |
display: flex; |
| 83 |
align-items: center; |
| 84 |
color: var(--menu-item-color); |
| 85 |
--eps-link-color: var(--menu-item-color); |
| 86 |
|
| 87 |
&:not(:last-child) { |
| 88 |
padding-inline-end: 0; |
| 89 |
} |
| 90 |
|
| 91 |
.eps-icon { |
| 92 |
font-size: $menu-item-icon-size; |
| 93 |
color: var(--menu-item-icon-color); |
| 94 |
margin-inline-end: $menu-item-link-spacing; |
| 95 |
} |
| 96 |
} |
| 97 |
|
| 98 |
&__action-button { |
| 99 |
color: var(--menu-item-action-button-color); |
| 100 |
opacity: var(--action-button-opacity); |
| 101 |
padding: $menu-item-action-button-padding; |
| 102 |
transition: $menu-item-transition; |
| 103 |
margin-inline-end: $menu-item-action-button-margin; |
| 104 |
} |
| 105 |
|
| 106 |
&--active { |
| 107 |
--menu-item-pointer-width: #{$menu-item-pointer-width}; |
| 108 |
box-shadow: $menu-item-active-box-shadow; |
| 109 |
|
| 110 |
.#{$eps-prefix}menu-item__link .eps-icon { |
| 111 |
color: $menu-item-pointer-color; |
| 112 |
} |
| 113 |
} |
| 114 |
} |
| 115 |
|