Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 9f1bffc

Browse files
authored
Fix file button and audio player overflowing from message bubble (#8666)
* Fix file button and audio player overflowing from message bubble Signed-off-by: Suguru Hirahara <[email protected]> * Move '.mx_EventTile_image' to '.mx_EventTile_mediaLine' Signed-off-by: Suguru Hirahara <[email protected]> * yarn run lint:style --fix Signed-off-by: Suguru Hirahara <[email protected]> * Use class names for now, adding a TODO comment Remove unset as it is no longer required. Signed-off-by: Suguru Hirahara <[email protected]>
1 parent ef97714 commit 9f1bffc

File tree

2 files changed

+28
-24
lines changed

2 files changed

+28
-24
lines changed

res/css/views/rooms/_EventBubbleTile.scss

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -284,29 +284,37 @@ limitations under the License.
284284
z-index: 3; // above media and location share maps
285285
}
286286

287-
&.mx_EventTile_mediaLine .mx_MVoiceMessageBody {
288-
// allow the event to be collapsed, this causes the waveform to get cropped
289-
min-width: 0;
290-
}
287+
&.mx_EventTile_mediaLine {
288+
// TODO: Use a common class name instead
289+
.mx_MFileBody,
290+
.mx_MAudioBody {
291+
max-width: 100%; // avoid overflow
292+
}
291293

292-
// we put the timestamps for media (other than stickers) atop the media
293-
// for images we also apply a linear gradient and change the timestamp colour to aid readability
294-
&.mx_EventTile_mediaLine.mx_EventTile_image {
295-
.mx_MessageTimestamp {
296-
color: #ffffff; // regardless of theme, always visible on the below gradient
294+
.mx_MVoiceMessageBody {
295+
// allow the event to be collapsed, this causes the waveform to get cropped
296+
min-width: 0;
297297
}
298298

299-
// linear gradient to make the timestamp more visible
300-
.mx_MImageBody::before {
301-
content: "";
302-
position: absolute;
303-
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 100%);
304-
z-index: 1;
305-
top: 0;
306-
bottom: 0;
307-
left: 0;
308-
right: 0;
309-
pointer-events: none;
299+
// we put the timestamps for media (other than stickers) atop the media
300+
// for images we also apply a linear gradient and change the timestamp colour to aid readability
301+
&.mx_EventTile_image {
302+
.mx_MessageTimestamp {
303+
color: #ffffff; // regardless of theme, always visible on the below gradient
304+
}
305+
306+
// linear gradient to make the timestamp more visible
307+
.mx_MImageBody::before {
308+
content: "";
309+
position: absolute;
310+
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 100%);
311+
z-index: 1;
312+
top: 0;
313+
bottom: 0;
314+
left: 0;
315+
right: 0;
316+
pointer-events: none;
317+
}
310318
}
311319
}
312320

res/css/views/rooms/_EventTile.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -903,10 +903,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
903903
.mx_EventTile_line.mx_EventTile_mediaLine {
904904
padding: 0;
905905
max-width: 100%;
906-
907-
.mx_MFileBody {
908-
width: 100%;
909-
}
910906
}
911907

912908
&[data-self=true] {

0 commit comments

Comments
 (0)