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