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