-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
attachmentElementShadow.css
213 lines (199 loc) · 9.47 KB
/
attachmentElementShadow.css
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
/*
* Copyright (C) 2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
div#attachment-container {
display: grid;
gap: 0;
#if (defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
grid-template-columns: 76px auto;
width: 338px;
height: 92px;
background-color: -apple-system-quaternary-fill;
#else
grid-template-columns: 68px auto;
width: 266px;
height: 80px;
background-color: -apple-system-tertiary-fill;
#endif
border-radius: 8px;
font: caption;
pointer-events: none;
user-select: none;
-webkit-user-select: none;
}
div#attachment-container::selection {
background-color: -apple-system-selected-content-background;
}
div#attachment-preview-area {
grid-row: 1;
grid-column: 1;
#if (defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
width: 56px; /* Co-dependent with attachmentImageOnlySize.width */
height: 72px; /* Co-dependent with attachmentImageOnlySize.height */
padding: 10px;
border-radius: 12px 0px 0px 12px;
#else
width: 40px;
height: 52px; /* Co-dependent with attachmentImageOnlyIconSize */
padding: 14px;
border-radius: 8px 0px 0px 8px;
#endif
display: grid;
gap: 0;
align-items: center;
justify-items: center;
}
attachment#attachment-preview {
grid-row: 1;
grid-column: 1;
#if (defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
max-width: 72px;
max-height: 72px;
#else
max-width: 52px;
max-height: 52px;
#endif
overflow: hidden;
}
div#attachment-progress {
grid-row: 1;
grid-column: 1;
width: 100%;
aspect-ratio: 1;
border-radius: 50%;
color: -apple-system-secondary-label;
background: conic-gradient(currentcolor calc(var(--progress) * 100%), transparent 0);
}
/* FIXME: Move the border into attachment-progress above, and remove this div, when rdar://107621207 is fixed (currently it produces artifacts at the edges). */
div#attachment-progress-circle {
width: 100%;
aspect-ratio: 1;
border-radius: 50%;
border: 4px solid currentcolor;
box-sizing: border-box;
}
div#attachment-information-area {
grid-row: 1;
grid-column: 2;
#if (defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
height: 92px;
border-radius: 0px 12px 12px 0px;
#else
height: 80px;
border-radius: 0px 8px 8px 0px;
#endif
padding: 0;
display: grid;
gap: 0;
align-items: center;
}
div#attachment-information-block {
grid-row: 1;
grid-column: 1;
#if (defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
margin-inline-start: 6px;
margin-inline-end: 26px;
#else
margin-inline-start: 4px;
margin-inline-end: 24px;
#endif
margin-top: auto;
margin-bottom: auto;
display: grid;
gap: 0;
}
div#attachment-action {
grid-row: 1;
grid-column: 1;
justify-self: stretch;
font-size: small;
font-weight: bold;
color: -apple-system-secondary-label;
display: -webkit-box;
-webkit-line-clamp: 1;
overflow: hidden;
-webkit-box-orient: vertical;
}
div#attachment-title {
grid-row: 2;
grid-column: 1;
justify-self: stretch;
font-size: small;
font-weight: bold;
color: -apple-system-label;
overflow-wrap: anywhere;
display: -webkit-box;
-webkit-line-clamp: 2;
overflow: hidden;
-webkit-box-orient: vertical;
}
div#attachment-subtitle {
grid-row: 3;
grid-column: 1;
justify-self: stretch;
font-size: x-small;
color: -apple-system-secondary-label;
display: -webkit-box;
-webkit-line-clamp: 1;
overflow: hidden;
-webkit-box-orient: vertical;
}
div#attachment-save-area {
grid-row: 1 / 4;
grid-column: 2;
justify-self: end;
align-self: center;
margin-inline-start: 10px;
}
button#attachment-save-button {
#if (defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
width: 40px;
height: 40px;
background-color: -apple-system-tertiary-fill;
border: 0;
#else
width: 28px;
height: 28px;
background-color: transparent;
border: 1px solid -apple-system-secondary-label;
#endif
border-radius: 50%;
margin: 0;
padding: 0;
pointer-events: initial;
}
div#attachment-save-icon {
/* SF Symbol square.and.arrow.down */
#if (defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY)
background-image: url('data:image/svg+xml,<svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path color="-apple-system-blue" stroke="currentcolor" fill="currentcolor" d="M8.80075473,59.9883397 L40.5007359,59.9883397 C46.2924906,59.9883397 49.171302,57.097585 49.171302,51.4056737 L49.171302,23.867434 C49.171302,18.1695849 46.2924906,15.2847736 40.5007359,15.2847736 L32.168717,15.2847736 L32.168717,19.7534717 L40.4302076,19.7534717 C43.1372265,19.7534717 44.7259246,21.2363774 44.7259246,24.0844529 L44.7259246,51.1886684 C44.7259246,54.0660284 43.1372265,55.5136699 40.4302076,55.5136699 L8.87128303,55.5136699 C6.11111322,55.5136699 4.57556605,54.0660284 4.57556605,51.1886684 L4.57556605,24.0844529 C4.57556605,21.2363774 6.11111322,19.7534717 8.87128303,19.7534717 L17.1035095,19.7534717 L17.1035095,15.2847736 L8.80075473,15.2847736 C3.03832076,15.2847736 0.130188679,18.1576415 0.130188679,23.867434 L0.130188679,51.4056737 C0.130188679,57.1095284 3.03832076,59.9883397 8.80075473,59.9883397 Z M24.6361132,41.8179623 C25.2225849,41.8179623 25.6858868,41.6302076 26.2370378,41.0790567 L35.5687925,32.0635472 C36.0028302,31.6588302 36.2491133,31.2015284 36.2491133,30.6150567 C36.2491133,29.4773774 35.375151,28.662 34.214151,28.662 C33.6862642,28.662 33.1231699,28.8849623 32.7184529,29.3482642 L28.5285283,33.8018491 L26.6770189,35.747151 L26.8587736,31.6220944 L26.8587736,2.50086793 C26.8587736,1.32198113 25.8383208,0.336792453 24.6361132,0.336792453 C23.4631699,0.336792453 22.442717,1.32198113 22.442717,2.50086793 L22.442717,31.6220944 L22.6244717,35.753151 L20.7670189,33.8018491 L16.5710944,29.3482642 C16.1723774,28.8849623 15.5799623,28.662 15.0520755,28.662 C13.8851321,28.662 13.0463774,29.4773774 13.0463774,30.6150567 C13.0463774,31.2015284 13.292717,31.6588302 13.697434,32.0635472 L23.0351321,41.0790567 C23.6096604,41.6302076 24.0789623,41.8179623 24.6361132,41.8179623 Z" transform="translate(7.377 2)"></path></svg>');
background-size: 83%;
#else
background-image: url('data:image/svg+xml,<svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path color="-apple-system-secondary-label" stroke="currentcolor" fill="currentcolor" d="M8.80075473,59.9883397 L40.5007359,59.9883397 C46.2924906,59.9883397 49.171302,57.097585 49.171302,51.4056737 L49.171302,23.867434 C49.171302,18.1695849 46.2924906,15.2847736 40.5007359,15.2847736 L32.168717,15.2847736 L32.168717,19.7534717 L40.4302076,19.7534717 C43.1372265,19.7534717 44.7259246,21.2363774 44.7259246,24.0844529 L44.7259246,51.1886684 C44.7259246,54.0660284 43.1372265,55.5136699 40.4302076,55.5136699 L8.87128303,55.5136699 C6.11111322,55.5136699 4.57556605,54.0660284 4.57556605,51.1886684 L4.57556605,24.0844529 C4.57556605,21.2363774 6.11111322,19.7534717 8.87128303,19.7534717 L17.1035095,19.7534717 L17.1035095,15.2847736 L8.80075473,15.2847736 C3.03832076,15.2847736 0.130188679,18.1576415 0.130188679,23.867434 L0.130188679,51.4056737 C0.130188679,57.1095284 3.03832076,59.9883397 8.80075473,59.9883397 Z M24.6361132,41.8179623 C25.2225849,41.8179623 25.6858868,41.6302076 26.2370378,41.0790567 L35.5687925,32.0635472 C36.0028302,31.6588302 36.2491133,31.2015284 36.2491133,30.6150567 C36.2491133,29.4773774 35.375151,28.662 34.214151,28.662 C33.6862642,28.662 33.1231699,28.8849623 32.7184529,29.3482642 L28.5285283,33.8018491 L26.6770189,35.747151 L26.8587736,31.6220944 L26.8587736,2.50086793 C26.8587736,1.32198113 25.8383208,0.336792453 24.6361132,0.336792453 C23.4631699,0.336792453 22.442717,1.32198113 22.442717,2.50086793 L22.442717,31.6220944 L22.6244717,35.753151 L20.7670189,33.8018491 L16.5710944,29.3482642 C16.1723774,28.8849623 15.5799623,28.662 15.0520755,28.662 C13.8851321,28.662 13.0463774,29.4773774 13.0463774,30.6150567 C13.0463774,31.2015284 13.292717,31.6588302 13.697434,32.0635472 L23.0351321,41.0790567 C23.6096604,41.6302076 24.0789623,41.8179623 24.6361132,41.8179623 Z" transform="translate(7.377 2)"></path></svg>');
background-size: 70%;
#endif
background-repeat: no-repeat;
background-position: center;
width: 22px;
height: 22px;
margin: auto;
}