_menu.scss
ASCII text
1/* Popovers/Menus */ 2 3// the popover itself 4.popup-menu-boxpointer { 5-arrow-base: 0; 6-arrow-rise: 0; 7-arrow-border-width: 0; 8-arrow-border-color: transparent; 9-arrow-border-radius: 20px; // This is necessary for the weird bug: materia-theme#296 10-arrow-box-shadow: none; // dreaming bugzilla #689995 11-arrow-background-color: transparent; 12} 13 14// container of the popover menu 15.popup-menu { 16min-width: 15em; 17border-color: transparent; 18color: inherit; 19 20// dunno what that is 21.popup-status-menu-item { 22// font-weight: normal; 23// color: pink; 24} 25 26&.panel-menu { 27-boxpointer-gap: 0; // distance from the panel 28margin-bottom: 1.75em; 29} 30} 31 32.popup-menu-content { 33margin: 8px; 34padding: 8px 0; 35border-radius: $corner-radius; 36box-shadow: $shadow-z4; 37background-color: $surface-z8; 38color: $on-surface; 39} 40 41// menu items 42.popup-menu-item { 43// min-height: $menuitem-size - 4px * 2; 44spacing: 8px; 45padding: 0; 46transition-duration: $duration; 47 48&:ltr { 49padding: 0.4em; 50padding-right: 24px; 51padding-left: 0; 52} 53 54&:rtl { 55padding: 0.4em; 56padding-right: 0; 57padding-left: 24px; 58} 59 60&.selected { 61background-color: overlay("hover", $on-surface); 62transition-duration: 0ms; 63 64&, 65&:active { 66color: $on-surface; 67} 68} 69 70&:active { 71background-color: overlay("pressed", $on-surface); 72color: $on-surface; 73transition-duration: $duration-ripple; 74} 75 76&:checked { 77box-shadow: none; 78background-color: $overlay-selected; 79font-weight: normal; 80 81&.selected { 82background-color: overlay("hover", $primary, $on: $overlay-selected); 83} 84 85&:active { 86background-color: overlay("pressed", $primary, $on: $overlay-selected); 87} 88} 89 90&:insensitive { 91color: disabled($on-surface); 92} 93} 94 95// all icons and other graphical elements 96.popup-inactive-menu-item { 97color: $on-surface; 98 99&:insensitive { 100color: disabled($on-surface); 101} 102} 103 104// symbolic icons in popover 105 106.popup-menu-arrow { 107@if $version >= 3.32 { 108icon-size: 16px; 109} @else { 110width: 16px; 111height: 16px; 112} 113 114.popup-menu-content & { 115color: hint($on-surface); 116} 117} 118 119.popup-menu-icon { 120icon-size: 16px; 121color: hint($on-surface); 122} 123 124// popover submenus 125.popup-sub-menu { 126border-top: 0; 127border-bottom: 0; 128padding-bottom: 0; 129box-shadow: none; 130background-color: entry-fill($on-surface); 131} 132 133// container for radio and check boxes 134.popup-menu-ornament { 135text-align: right; 136width: 16px; 137height: 16px; 138 139&:ltr { 140text-align: right; 141} 142 143&:rtl { 144text-align: left; 145} 146} 147 148// separator 149@if $version >= 3.36 { 150.popup-separator-menu-item { 151padding: 0; 152 153.popup-separator-menu-item-separator { 154// -margin-horizontal: 24px; 155height: 1px; // not really the whole box 156margin: 8px 0; 157background-color: divider($on-surface); 158 159// submenu separators 160.popup-sub-menu & { 161margin: 8px 0; 162background-color: divider($on-surface); 163 164&:ltr { 165margin-right: 32px; 166} 167 168&:rtl { 169margin-left: 32px; 170} 171} 172} 173} 174} @else { 175.popup-separator-menu-item { 176// -margin-horizontal: 24px; 177height: 1px; // not really the whole box 178margin: 8px 64px - 24px; 179border: 0; 180background-color: divider($on-surface); 181} 182} 183 184// desktop background menu 185.background-menu { 186-boxpointer-gap: 4px; 187-arrow-rise: 0; // hide the beak on the menu 188} 189 190// system status menu 191.aggregate-menu { 192min-width: 21em; 193 194// lock screen, shutdown, etc. buttons 195.popup-menu-icon { 196padding: 0; 197margin: 0 4px; 198-st-icon-style: symbolic; // >= 3.36 199} 200 201.popup-sub-menu .popup-menu-item > :first-child { 202// account for icons in submenus with padding 203&:ltr { 204padding-left: 16px; 205margin-left: 16px; 206} 207 208&:rtl { 209padding-right: 16px; 210margin-right: 16px; 211} 212} 213} 214 215@if $version == 3.32 { 216.system-switch-user-submenu-icon { 217icon-size: 16px; 218padding: 0 4px; 219} 220} @else if $version < 3.32 { 221.system-switch-user-submenu-icon.user-icon { 222icon-size: 20px; 223padding: 0 2px; 224} 225 226.system-switch-user-submenu-icon.default-icon { 227icon-size: 16px; 228padding: 0 4px; 229} 230} 231 232@if $version < 3.36 { 233.system-menu-action { 234-st-icon-style: symbolic; // >= 3.30 235padding: ($large-size - 16px) / 2; 236border: 0; 237border-radius: $large-size / 2; // wish we could do 50% 238color: hint($on-surface); 239transition-duration: $duration; 240 241&:hover, 242&:focus { 243padding: ($large-size - 16px) / 2; 244border: 0; 245color: hint($on-surface); 246} 247 248&:focus { 249background-color: overlay("focus", $on-surface); 250} 251 252&:hover { 253background-color: overlay("hover", $on-surface); 254} 255 256&:active { 257background-color: overlay("pressed", $on-surface); 258color: hint($on-surface); 259transition-duration: $duration-ripple; 260} 261 262> StIcon { 263icon-size: 16px; 264} 265} 266} 267