2021-12-01 11:50:06 +01:00
|
|
|
/*
|
2024-09-09 15:57:16 +02:00
|
|
|
Copyright 2024 New Vector Ltd.
|
|
|
|
Copyright 2019-2021 The Matrix.org Foundation C.I.C.
|
2021-12-01 11:50:06 +01: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.
|
2021-12-01 11:50:06 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
.mx_InteractiveTooltip_wrapper {
|
|
|
|
position: fixed;
|
2022-05-10 20:50:09 +02:00
|
|
|
z-index: 3999;
|
2021-12-01 11:50:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_InteractiveTooltip {
|
|
|
|
border-radius: 8px;
|
|
|
|
background-color: $background;
|
|
|
|
color: $primary-content;
|
|
|
|
position: absolute;
|
|
|
|
z-index: 5001;
|
2024-01-02 19:56:39 +01:00
|
|
|
box-shadow:
|
|
|
|
0 24px 8px rgb(17 17 26 / 4%),
|
|
|
|
0 8px 32px rgb(17 17 26 / 4%);
|
2021-12-01 11:50:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_InteractiveTooltip.mx_InteractiveTooltip_withChevron_top {
|
2022-07-27 15:39:29 +02:00
|
|
|
top: 10px; /* 8px chevron + 2px spacing */
|
2021-12-01 11:50:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_InteractiveTooltip.mx_InteractiveTooltip_withChevron_left {
|
2022-07-27 15:39:29 +02:00
|
|
|
left: 10px; /* 8px chevron + 2px spacing */
|
2021-12-01 11:50:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_InteractiveTooltip.mx_InteractiveTooltip_withChevron_right {
|
2022-07-27 15:39:29 +02:00
|
|
|
right: 10px; /* 8px chevron + 2px spacing */
|
2021-12-01 11:50:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_InteractiveTooltip.mx_InteractiveTooltip_withChevron_bottom {
|
2022-07-27 15:39:29 +02:00
|
|
|
bottom: 10px; /* 8px chevron + 2px spacing */
|
2021-12-01 11:50:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_InteractiveTooltip_chevron_top {
|
|
|
|
position: absolute;
|
|
|
|
left: calc(50% - 8px);
|
|
|
|
top: -8px;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
border-left: 8px solid transparent;
|
|
|
|
border-bottom: 8px solid $background;
|
|
|
|
border-right: 8px solid transparent;
|
|
|
|
}
|
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Adapted from https://codyhouse.co/blog/post/css-rounded-triangles-with-clip-path */
|
|
|
|
/* by Sebastiano Guerriero (@guerriero_se) */
|
2021-12-01 11:50:06 +01:00
|
|
|
@supports (clip-path: polygon(0% 0%, 100% 100%, 0% 100%)) {
|
|
|
|
.mx_InteractiveTooltip_chevron_top {
|
|
|
|
height: 16px;
|
|
|
|
width: 16px;
|
|
|
|
background-color: inherit;
|
|
|
|
border: none;
|
|
|
|
clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
|
|
|
|
transform: rotate(135deg);
|
|
|
|
border-radius: 0 0 0 3px;
|
2022-07-27 15:39:29 +02:00
|
|
|
top: calc(-8px / 1.414); /* sqrt(2) because of rotation */
|
2021-12-01 11:50:06 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_InteractiveTooltip_chevron_bottom {
|
|
|
|
position: absolute;
|
|
|
|
left: calc(50% - 8px);
|
|
|
|
bottom: -8px;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
border-left: 8px solid transparent;
|
|
|
|
border-top: 8px solid $background;
|
|
|
|
border-right: 8px solid transparent;
|
|
|
|
}
|
|
|
|
|
2022-07-27 15:39:29 +02:00
|
|
|
/* Adapted from https://codyhouse.co/blog/post/css-rounded-triangles-with-clip-path */
|
|
|
|
/* by Sebastiano Guerriero (@guerriero_se) */
|
2021-12-01 11:50:06 +01:00
|
|
|
@supports (clip-path: polygon(0% 0%, 100% 100%, 0% 100%)) {
|
|
|
|
.mx_InteractiveTooltip_chevron_bottom {
|
|
|
|
height: 16px;
|
|
|
|
width: 16px;
|
|
|
|
background-color: inherit;
|
|
|
|
border: none;
|
|
|
|
clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
|
|
|
|
transform: rotate(-45deg);
|
|
|
|
border-radius: 0 0 0 3px;
|
2022-07-27 15:39:29 +02:00
|
|
|
bottom: calc(-8px / 1.414); /* sqrt(2) because of rotation */
|
2021-12-01 11:50:06 +01:00
|
|
|
}
|
|
|
|
}
|