2018-04-12 01:23:35 +02:00
|
|
|
/*
|
2024-09-09 15:57:16 +02:00
|
|
|
Copyright 2024 New Vector Ltd.
|
2021-11-17 16:19:30 +01:00
|
|
|
Copyright 2021 The Matrix.org Foundation C.I.C.
|
2024-09-09 15:57:16 +02:00
|
|
|
Copyright 2015, 2016 OpenMarket Ltd
|
2018-04-12 01:23:35 +02:00
|
|
|
|
2024-09-09 15:57:16 +02:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
|
|
|
Please see LICENSE files in the repository root for full details.
|
2018-04-12 01:23:35 +02:00
|
|
|
*/
|
|
|
|
|
2022-05-14 10:31:53 +02:00
|
|
|
.mx_MImageBody_banner {
|
|
|
|
position: absolute;
|
2022-06-05 08:30:29 +02:00
|
|
|
bottom: $spacing-4;
|
|
|
|
left: $spacing-4;
|
|
|
|
padding: $spacing-4;
|
2023-05-09 23:06:19 +02:00
|
|
|
border-radius: var(--MBody-border-radius);
|
2022-05-14 10:31:53 +02:00
|
|
|
font-size: $font-15px;
|
2022-07-27 15:39:29 +02:00
|
|
|
user-select: none; /* prevent banner text from being selected */
|
|
|
|
pointer-events: none; /* let the cursor go through to the media underneath */
|
2022-05-14 10:31:53 +02:00
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Trying to match the width of the image is surprisingly difficult, so arbitrarily break it off early. */
|
2022-05-14 10:31:53 +02:00
|
|
|
max-width: min(100%, 350px);
|
|
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Hardcoded colours because it's the same on all themes */
|
2022-05-14 10:31:53 +02:00
|
|
|
background-color: rgba(0, 0, 0, 0.6);
|
|
|
|
color: #ffffff;
|
|
|
|
}
|
|
|
|
|
2022-03-28 21:07:02 +02:00
|
|
|
.mx_MImageBody_placeholder {
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Position the placeholder on top of the thumbnail, so that the reveal animation can work */
|
2021-08-10 18:38:38 +02:00
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
2021-07-20 08:54:32 +02:00
|
|
|
|
2022-03-28 21:07:02 +02:00
|
|
|
background-color: $background;
|
|
|
|
|
2021-08-10 18:38:38 +02:00
|
|
|
.mx_Blurhash > canvas {
|
2022-12-12 12:24:14 +01:00
|
|
|
animation: mx--anim-pulse 1.75s infinite cubic-bezier(0.4, 0, 0.6, 1);
|
2021-05-21 22:46:18 +02:00
|
|
|
}
|
2018-05-17 19:15:34 +02:00
|
|
|
}
|
|
|
|
|
2022-05-27 19:18:44 +02:00
|
|
|
.mx_MImageBody_thumbnail_container {
|
2023-05-09 23:06:19 +02:00
|
|
|
border-radius: var(--MBody-border-radius);
|
2022-05-27 19:18:44 +02:00
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Necessary for the border radius to apply correctly to the placeholder */
|
2022-05-27 19:18:44 +02:00
|
|
|
overflow: hidden;
|
|
|
|
contain: paint;
|
2022-03-28 21:07:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_MImageBody_thumbnail {
|
|
|
|
display: block;
|
2018-05-18 11:27:22 +02:00
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Force the image to be the full size of the container, even if the */
|
|
|
|
/* pixel size is smaller. The problem here is that we don't know what */
|
|
|
|
/* thumbnail size the HS is going to give us, but we have to commit to */
|
|
|
|
/* a container size immediately and not change it when the image loads */
|
|
|
|
/* or we'll get a scroll jump (or have to leave blank space). */
|
|
|
|
/* This will obviously result in an upscaled image which will be a bit */
|
|
|
|
/* blurry. The best fix would be for the HS to advertise what size thumbnails */
|
|
|
|
/* it guarantees to produce. */
|
2022-03-28 21:07:02 +02:00
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
2018-05-17 19:15:34 +02:00
|
|
|
}
|
2018-05-18 12:33:33 +02:00
|
|
|
|
2018-10-24 20:06:48 +02:00
|
|
|
.mx_MImageBody_gifLabel {
|
2018-10-22 21:57:58 +02:00
|
|
|
position: absolute;
|
|
|
|
display: block;
|
|
|
|
top: 0px;
|
|
|
|
left: 14px;
|
|
|
|
padding: 5px;
|
|
|
|
border-radius: 5px;
|
|
|
|
background: $imagebody-giflabel;
|
|
|
|
border: 2px solid $imagebody-giflabel-border;
|
2019-01-07 14:49:01 +01:00
|
|
|
color: $imagebody-giflabel-color;
|
|
|
|
pointer-events: none;
|
2018-10-22 21:57:58 +02:00
|
|
|
}
|
2019-10-02 01:00:01 +02:00
|
|
|
|
|
|
|
.mx_HiddenImagePlaceholder {
|
|
|
|
position: absolute;
|
2023-05-09 12:02:12 +02:00
|
|
|
inset: 0;
|
2019-10-02 01:00:01 +02:00
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* To center the text in the middle of the frame */
|
2019-10-02 01:00:01 +02:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
background-color: $header-panel-bg-color;
|
|
|
|
|
|
|
|
.mx_HiddenImagePlaceholder_button {
|
2021-11-11 14:37:29 +01:00
|
|
|
color: $accent;
|
2019-10-02 01:00:01 +02:00
|
|
|
|
2019-10-02 20:52:07 +02:00
|
|
|
span.mx_HiddenImagePlaceholder_eye {
|
2019-10-02 01:00:01 +02:00
|
|
|
margin-right: 8px;
|
2019-10-02 20:52:07 +02:00
|
|
|
|
2021-11-11 14:37:29 +01:00
|
|
|
background-color: $accent;
|
2022-12-12 12:24:14 +01:00
|
|
|
mask-image: url("$(res)/img/feather-customised/eye.svg");
|
2019-10-02 20:52:07 +02:00
|
|
|
display: inline-block;
|
|
|
|
width: 18px;
|
|
|
|
height: 14px;
|
2019-10-02 01:00:01 +02:00
|
|
|
}
|
|
|
|
|
2019-10-02 20:52:07 +02:00
|
|
|
span:not(.mx_HiddenImagePlaceholder_eye) {
|
2019-10-02 01:00:01 +02:00
|
|
|
vertical-align: text-bottom;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_EventTile:hover .mx_HiddenImagePlaceholder {
|
2021-08-12 11:10:47 +02:00
|
|
|
background-color: $background;
|
2019-10-02 01:00:01 +02:00
|
|
|
}
|