-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathqds-avatar.css
More file actions
133 lines (125 loc) · 3.18 KB
/
Copy pathqds-avatar.css
File metadata and controls
133 lines (125 loc) · 3.18 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
.qui-avatar__root {
align-items: center;
background: transparent;
border: 0 solid;
border-radius: var(--avatar-radius);
display: inline-flex;
flex-shrink: 0;
height: var(--avatar-size);
justify-content: center;
padding: 0;
position: relative;
user-select: none;
vertical-align: top;
width: var(--avatar-size);
--avatar-radius: 9999px;
&[data-size="xs"] {
--avatar-size: 24px;
--avatar-content-font: var(--font-static-heading-xxs-bold);
--avatar-status-size: 6px;
& .qui-icon__root {
--icon-size: 16px;
}
}
&[data-size="sm"] {
--avatar-size: 32px;
--avatar-content-font: var(--font-static-heading-xs-bold);
--avatar-status-size: 8px;
& .qui-icon__root {
--icon-size: 20px;
}
}
/* default */
&[data-size="md"] {
--avatar-size: 48px;
--avatar-content-font: var(--font-static-heading-md-bold);
--avatar-status-size: 12px;
& .qui-icon__root {
--icon-size: 24px;
}
}
&[data-size="lg"] {
--avatar-size: 56px;
--avatar-content-font: var(--font-static-heading-lg-bold);
--avatar-status-size: 16px;
& .qui-icon__root {
--icon-size: 32px;
}
}
&[data-size="xl"] {
--avatar-size: 80px;
--avatar-content-font: var(--font-static-heading-xl);
--avatar-status-size: 20px;
& .qui-icon__root {
--icon-size: 40px;
}
}
}
.qui-avatar__image {
border-radius: var(--avatar-radius);
display: block;
height: 100%;
min-width: 100%;
object-fit: cover;
overflow: clip;
width: 100%;
&[hidden] {
display: none;
}
}
.qui-avatar__content {
/* default */
&[data-variant="neutral"] {
--avatar-foreground-color: var(--color-text-neutral-primary);
--avatar-background-color: var(--color-background-neutral-03);
}
&[data-variant="contrast"] {
--avatar-foreground-color: var(--color-text-neutral-inverse);
--avatar-background-color: var(--color-background-neutral-10);
}
&[data-variant="brand"] {
--avatar-foreground-color: var(--color-utility-persistent-white);
--avatar-background-color: var(--color-background-brand-primary);
}
align-items: center;
background-color: var(--avatar-background-color);
border-radius: var(--avatar-radius);
color: var(--avatar-foreground-color);
display: flex;
font: var(--avatar-content-font);
height: 100%;
justify-content: center;
line-height: 1;
overflow: clip;
text-transform: uppercase;
width: 100%;
&[hidden] {
display: none;
}
}
.qui-avatar__status {
border: var(--avatar-status-border-size, 1px) solid
var(--color-border-neutral-00);
border-radius: 50%;
bottom: 0;
box-sizing: border-box;
height: var(--avatar-status-size);
position: absolute;
right: 0;
width: var(--avatar-status-size);
:is([data-size="lg"], [data-size="xl"]) & {
--avatar-status-border-size: 2px;
}
&[data-status="active"] {
background-color: var(--color-background-support-success);
}
&[data-status="offline"] {
background-color: var(--color-background-support-neutral);
}
&[data-status="away"] {
background-color: var(--color-background-support-warning);
}
&[data-status="busy"] {
background-color: var(--color-background-support-danger);
}
}