_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: 4px; // distance from the panel 28margin-bottom: 1.75em; 29} 30} 31 32.popup-menu-content { 33margin: 5px 8px 8px; 34padding: 8px 0; 35border-radius: $corner-radius; 36box-shadow: $shadow-2; 37background-color: $surface; 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, $background: $overlay-selected); 83} 84 85&:active { 86background-color: overlay("pressed", $primary, $background: $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 140// separator 141@if $version >= 3.36 { 142.popup-separator-menu-item { 143padding: 0; 144 145.popup-separator-menu-item-separator { 146// -margin-horizontal: 24px; 147height: 1px; // not really the whole box 148margin: 8px 0; 149background-color: divider($on-surface); 150 151// submenu separators 152.popup-sub-menu & { 153margin: 8px 0; 154background-color: divider($on-surface); 155 156&:ltr { 157margin-right: 32px; 158} 159 160&:rtl { 161margin-left: 32px; 162} 163} 164} 165} 166} @else { 167.popup-separator-menu-item { 168// -margin-horizontal: 24px; 169height: 1px; // not really the whole box 170margin: 8px 64px - 24px; 171border: 0; 172background-color: divider($on-surface); 173} 174} 175 176// desktop background menu 177.background-menu { 178-boxpointer-gap: 4px; 179-arrow-rise: 0; // hide the beak on the menu 180} 181 182// system status menu 183.aggregate-menu { 184min-width: 21em; 185 186// lock screen, shutdown, etc. buttons 187.popup-menu-icon { 188padding: 0; 189margin: 0 4px; 190-st-icon-style: symbolic; // >= 3.36 191} 192 193.popup-sub-menu .popup-menu-item > :first-child { 194// account for icons in submenus with padding 195&:ltr { 196padding-left: 16px; 197margin-left: 16px; 198} 199 200&:rtl { 201padding-right: 16px; 202margin-right: 16px; 203} 204} 205} 206 207@if $version == 3.32 { 208.system-switch-user-submenu-icon { 209icon-size: 16px; 210padding: 0 4px; 211} 212} @else if $version <= 3.30 { 213.system-switch-user-submenu-icon.user-icon { 214icon-size: 20px; 215padding: 0 2px; 216} 217 218.system-switch-user-submenu-icon.default-icon { 219icon-size: 16px; 220padding: 0 4px; 221} 222} 223 224@if $version <= 3.34 { 225.system-menu-action { 226-st-icon-style: symbolic; // >= 3.30 227padding: ($large-size - 16px) / 2; 228border: 0; 229border-radius: $large-size / 2; // wish we could do 50% 230color: hint($on-surface); 231transition-duration: $duration; 232 233&:hover, 234&:focus { 235padding: ($large-size - 16px) / 2; 236border: 0; 237color: hint($on-surface); 238} 239 240&:focus { 241background-color: overlay("focus", $on-surface); 242} 243 244&:hover { 245background-color: overlay("hover", $on-surface); 246} 247 248&:active { 249background-color: overlay("pressed", $on-surface); 250color: hint($on-surface); 251transition-duration: $duration-ripple; 252} 253 254> StIcon { 255icon-size: 16px; 256} 257} 258} 259