avatar.css (1178B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 :host { 6 --avatar-size: 40px; 7 --avatar-img-size: 20px; 8 9 box-sizing: border-box; 10 border-radius: var(--border-radius-circle); 11 } 12 13 .avatar { 14 display: flex; 15 align-items: center; 16 justify-content: center; 17 appearance: none; 18 background-color: transparent; 19 padding: 0; 20 width: var(--avatar-size); 21 height: var(--avatar-size); 22 border-radius: var(--border-radius-circle); 23 24 > img { 25 width: var(--avatar-img-size); 26 height: var(--avatar-img-size); 27 -moz-context-properties: fill, stroke; 28 fill: transparent; 29 stroke: currentColor; 30 } 31 32 &:hover { 33 background-color: var(--button-background-color-hover); 34 } 35 36 @media (forced-colors) { 37 &:hover { 38 border-color: SelectedItem; 39 40 > img { 41 stroke: SelectedItem; 42 } 43 } 44 45 :host([checked]) & { 46 border-color: SelectedItemText; 47 background-color: SelectedItem; 48 49 > img { 50 fill: SelectedItem; 51 stroke: SelectedItemText; 52 } 53 } 54 } 55 }