This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +38
-19
lines changed Expand file tree Collapse file tree 3 files changed +38
-19
lines changed Original file line number Diff line number Diff line change @@ -16,58 +16,50 @@ limitations under the License.
16
16
17
17
.mx_EventTileBubble {
18
18
background-color : $dark-panel-bg-color ;
19
- padding : 10px ;
19
+ padding : 10px ; // TODO: Use a spacing variable
20
20
border-radius : 8px ;
21
- margin : 10px auto ;
22
21
// Reserve space for external timestamps, but also cap the width
23
22
max-width : min (calc (100% - 2 * $MessageTimestamp_width ), 600px );
24
23
box-sizing : border-box ;
25
24
display : grid ;
26
25
grid-template-columns : 24px minmax (0 , 1fr ) min-content min-content ;
27
26
28
- .mx_EventTile [data-layout = bubble ] & {
29
- // Timestamps are inside the tile, so the width can be less constrained
30
- max-width : 600px ;
31
- }
32
-
33
- & ::before , & ::after {
27
+ & ::before ,
28
+ & ::after {
34
29
position : relative ;
35
30
grid-column : 1 ;
36
31
grid-row : 1 / 3 ;
37
32
width : 16px ;
38
33
height : 16px ;
39
34
content : " " ;
40
- top : 0 ;
41
- bottom : 0 ;
42
- left : 0 ;
43
- right : 0 ;
35
+ inset : 0 ;
44
36
mask-repeat : no-repeat ;
45
37
mask-position : center ;
46
38
mask-size : contain ;
47
- margin-top : 4 px ;
39
+ margin-top : $spacing-4 ;
48
40
}
49
41
50
- .mx_EventTileBubble_title , .mx_EventTileBubble_subtitle {
42
+ .mx_EventTileBubble_title ,
43
+ .mx_EventTileBubble_subtitle {
44
+ grid-column : 2 ;
51
45
overflow-wrap : break-word ;
52
46
}
53
47
54
48
.mx_EventTileBubble_title {
55
49
font-weight : 600 ;
56
50
font-size : $font-15px ;
57
- grid-column : 2 ;
58
51
grid-row : 1 ;
59
52
}
60
53
61
54
.mx_EventTileBubble_subtitle {
62
55
font-size : $font-12px ;
63
- grid-column : 2 ;
64
56
grid-row : 2 ;
65
57
}
66
58
67
59
.mx_MessageTimestamp {
68
60
grid-column : 4 ;
69
61
grid-row : 1 / 3 ;
70
62
align-self : center ;
71
- margin-left : 16 px ;
63
+ margin-left : $spacing-16 ;
72
64
}
73
65
}
Original file line number Diff line number Diff line change @@ -73,6 +73,10 @@ $left-gutter: 64px;
73
73
}
74
74
}
75
75
76
+ .mx_EventTileBubble {
77
+ margin-block : 10px ; // TODO: Use a spacing variable
78
+ }
79
+
76
80
.mx_MImageBody {
77
81
.mx_MImageBody_thumbnail_container {
78
82
display : flex ;
@@ -217,10 +221,28 @@ $left-gutter: 64px;
217
221
}
218
222
}
219
223
224
+ & [data-layout = bubble ],
225
+ & [data-layout = group ] {
226
+ .mx_EventTileBubble {
227
+ margin-inline : auto ;
228
+ }
229
+ }
230
+
220
231
& [data-layout = irc ] {
232
+ --EventTile_irc_line_info-inset-inline-start : calc (var (--name-width ) + 10px + var (--icon-width ));
233
+
221
234
.mx_MessageTimestamp {
222
235
text-align : right ;
223
236
}
237
+
238
+ .mx_EventTileBubble {
239
+ position : relative ;
240
+ left : var (--EventTile_irc_line_info-inset-inline-start );
241
+ }
242
+
243
+ .mx_ReplyTile .mx_EventTileBubble {
244
+ left : unset ; // Cancel the value specified above for the tile inside ReplyTile
245
+ }
224
246
}
225
247
226
248
& [data-layout = group ] {
@@ -306,6 +328,11 @@ $left-gutter: 64px;
306
328
}
307
329
308
330
& [data-layout = bubble ] {
331
+ .mx_EventTileBubble {
332
+ // Timestamps are inside the tile, so the width can be less constrained
333
+ max-width : 600px ;
334
+ }
335
+
309
336
& .mx_EventTile_continuation {
310
337
margin-top : 2px ;
311
338
}
Original file line number Diff line number Diff line change @@ -163,13 +163,13 @@ $irc-line-height: $font-18px;
163
163
164
164
.mx_EventTile.mx_EventTile_info {
165
165
.mx_EventTile_avatar {
166
- left : calc ( var (--name-width ) + 10 px + var ( --icon-width ) );
166
+ left : var (--EventTile_irc_line_info-inset-inline-start );
167
167
top : 0 ;
168
168
margin-right : var (--right-padding );
169
169
}
170
170
171
171
.mx_EventTile_line {
172
- left : calc ( var (--name-width ) + 10 px + var ( --icon-width ) );
172
+ left : var (--EventTile_irc_line_info-inset-inline-start );
173
173
}
174
174
175
175
.mx_TextualEvent {
You can’t perform that action at this time.
0 commit comments