summaryrefslogtreecommitdiffstats
path: root/comm/mail/themes/shared/mail/avatars.css
blob: b649b1375854c9dc229a8ee9e852f90765253b0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, you can obtain one at http://mozilla.org/MPL/2.0/. */

@import url("chrome://messenger/skin/colors.css");

:root {
  --recipient-avatar-size: 28px;
  --recipient-avatar-placeholder-size: 16px;

  --recipient-avatar-color: var(--color-gray-50);
  --recipient-avatar-background-color: var(--color-gray-30);
}

:root[uidensity="compact"] {
  --recipient-avatar-size: 24px;
  --recipient-avatar-placeholder-size: contain;
  --recipient-multi-line-gap: 0;
}

:root[uidensity="touch"] {
  --recipient-avatar-size: 32px;
  --recipient-avatar-placeholder-size: 16px;
}

@media not (prefers-contrast) {
  @media (prefers-color-scheme: dark) {
    :root {
      --recipient-avatar-color: var(--color-gray-30);
      --recipient-avatar-background-color: var(--color-gray-60);
    }
  }
}

@media (prefers-contrast) {
  :root {
    --recipient-avatar-color: currentColor;
    --recipient-avatar-background-color: color-mix(in srgb, currentColor 30%, transparent);
  }
}

.recipient-avatar {
  display: inline-flex;
  height: var(--recipient-avatar-size);
  width: var(--recipient-avatar-size);
  border-radius: 50%;
  margin-inline-end: 6px;
  text-align: center;
  overflow: hidden;
  color: var(--recipient-avatar-color);
  background-color: var(--recipient-avatar-background-color);
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.recipient-avatar.is-mail-list {
  background: none;
}

.recipient-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipient-avatar.is-mail-list img {
  -moz-context-properties: fill, stroke;
  fill: color-mix(in srgb, currentColor 20%, transparent);
  stroke: currentColor;
}