_message-list.scss
ASCII text
1/* Message List */ 2// a.k.a. notifications in the menu 3 4@use "../../../../theme"; 5@use "../../../../theme-color"; 6@use "../../../../st-theme"; 7@use "../../gnome-shell"; 8@use "../base/button"; 9@use "calendar"; 10 11// main list 12.message-list { 13width: 31.5em; 14padding: 0; 15 16.message-list-placeholder { 17spacing: 12px; 18} 19} 20 21.message-list-sections { 22spacing: 8px; 23margin: 0 8px; // to account for scrollbar 24} 25 26.message-list-section, 27.message-list-section-list { 28spacing: 8px; 29} 30 31.message-list-section-list { 32&:ltr { 33padding-left: 0; 34} 35 36&:rtl { 37padding-right: 0; 38} 39} 40 41@if gnome-shell.$version >= 3.36 { 42// do-not-disturb + clear button 43.message-list-controls { 44margin: 8px 8px 0; 45padding: 0; 46spacing: 8px; 47} 48} @else { 49// clear button 50.message-list-clear-button.button { 51@extend %button; 52margin: 8px 8px 0; 53} 54} 55 56// message bubbles 57.message { 58@include calendar.item; 59min-height: st-theme.$menuitem-size * 2; 60 61// icon container 62.message-icon-bin { 63padding: 12px 0 12px 12px; 64 65&:rtl { 66padding: 12px 12px 12px 0; 67} 68 69// icon size and color 70> StIcon { 71-st-icon-style: requested; 72icon-size: 16px; 73color: inherit; 74 75&, 76&:rtl { 77margin: 0; 78} 79} 80 81// fallback 82> .fallback-app-icon { 83width: 16px; 84height: 16px; 85} 86} 87 88// content 89.message-content { 90min-height: st-theme.$menuitem-size * 2 - 8px * 2; 91padding: 8px; 92spacing: 0; 93color: inherit; 94font-size: 1em; 95} 96 97// title 98.message-title { 99min-height: theme.$small-size - 2px; 100padding-top: 2px; 101color: inherit; 102font-weight: bold; 103font-size: 1em; 104} 105 106// secondary container in title box 107.message-secondary-bin { 108padding: 0 8px; 109 110// notification time stamp 111> .event-time { 112min-height: theme.$small-size - 2px; 113padding-top: 2px; 114color: theme-color.hint(theme-color.$on-surface); 115font-size: 1em; 116text-align: right; 117 118// HACK: the label should be baseline-aligned with a 1em label, 119// fake this with some bottom padding 120padding-bottom: 0; 121 122&:ltr { 123text-align: right; 124} 125 126&:rtl { 127text-align: left; 128} 129} 130 131> StIcon { 132icon-size: 16px; 133} 134} 135 136// close button 137$message-close-button: if(gnome-shell.$version >= 3.36, ".message-close-button", ".message-content > StBoxLayout > StButton"); 138 139#{$message-close-button} { 140transition-duration: st-theme.$duration; 141icon-size: 16px; 142padding: (theme.$small-size - 16px) / 2; 143border-radius: theme.$small-size / 2; 144 145&, 146&:hover, 147&:active { 148color: theme-color.hint(theme-color.$on-surface); 149} 150 151&:focus { 152background-color: theme-color.focus-overlay(theme-color.$on-surface); 153} 154 155&:hover { 156background-color: theme-color.hover-overlay(theme-color.$on-surface); 157} 158 159&:active { 160transition-duration: st-theme.$duration-ripple; 161background-color: theme-color.pressed-overlay(theme-color.$on-surface); 162} 163} 164 165// body 166.message-body { 167color: theme-color.hint(theme-color.$on-surface); 168} 169} 170 171// URLs in messages 172.url-highlighter { 173link-color: theme-color.$primary; 174} 175 176/* Media Controls */ 177.message-media-control { 178transition-duration: st-theme.$duration; 179margin: 16px 0; 180padding: 8px; 181border-radius: 16px; 182 183&, 184&:focus, 185&:hover, 186&:active { 187color: theme-color.hint(theme-color.$on-surface); 188} 189 190&:focus { 191background-color: theme-color.focus-overlay(theme-color.$on-surface); 192} 193 194&:hover { 195background-color: theme-color.hover-overlay(theme-color.$on-surface); 196} 197 198&:active { 199background-color: theme-color.pressed-overlay(theme-color.$on-surface); 200transition-duration: st-theme.$duration-ripple; 201} 202 203&:insensitive { 204color: theme-color.disabled-hint(theme-color.$on-surface); 205} 206 207&:last-child:ltr { 208margin-right: 16px; 209padding-right: 8px; 210border-radius: 16px; 211} 212 213&:last-child:rtl { 214margin-left: 16px; 215padding-left: 8px; 216border-radius: 16px; 217} 218} 219 220// album-art 221.media-message-cover-icon { 222icon-size: 32px !important; 223margin: 4px 0 !important; 224border-radius: 0; 225 226// when there is no artwork 227&.fallback { 228icon-size: 16px !important; 229padding: 8px; 230border: 0; 231border-radius: theme.$corner-radius; 232background-color: theme-color.fill(theme-color.$on-surface); 233color: theme-color.disabled(theme-color.$on-surface) !important; 234} 235} 236