element-web-Github/res/css/views/elements/_Tooltip.pcss
David Langley 491f0cd08a
Change license (#13)
* Copyright headers 1

* Licence headers 2

* Copyright Headers 3

* Copyright Headers 4

* Copyright Headers 5

* Copyright Headers 6

* Copyright headers 7

* Add copyright headers for html and config file

* Replace license files and update package.json

* Update with CLA

* lint
2024-09-09 13:57:16 +00:00

108 lines
2.0 KiB
Plaintext

/*
Copyright 2019-2024 New Vector Ltd.
Copyright 2015, 2016 OpenMarket Ltd
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
*/
@keyframes mx_fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes mx_fadeout {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
.mx_Tooltip_chevron {
position: absolute;
left: -7px;
top: calc(50% - 6px);
width: 0;
height: 0;
border-top: 7px solid transparent;
border-right: 7px solid $menu-border-color;
border-bottom: 7px solid transparent;
}
.mx_Tooltip_chevron::after {
content: "";
width: 0;
height: 0;
border-top: 6px solid transparent;
border-right: 6px solid $menu-bg-color;
border-bottom: 6px solid transparent;
position: absolute;
top: -6px;
left: 1px;
}
.mx_Tooltip {
display: none;
position: fixed;
border-radius: 8px;
z-index: 6000; /* Higher than context menu so tooltips can be used everywhere */
padding: 10px;
pointer-events: none;
line-height: $font-14px;
font-size: $font-12px;
font-weight: 500;
max-width: 300px;
word-break: break-word;
background-color: var(--cpd-color-alpha-gray-1400);
color: var(--cpd-color-text-on-solid-primary);
border: 0;
text-align: center;
.mx_Tooltip_chevron {
display: none;
}
&.mx_Tooltip_visible {
animation: mx_fadein 0.2s forwards;
}
&.mx_Tooltip_invisible {
animation: mx_fadeout 0.1s forwards;
}
ul,
ol {
text-align: start; /* for list items */
}
}
/* These tooltips use an older style with a chevron */
.mx_Field_tooltip {
background-color: $menu-bg-color;
color: $primary-content;
border: 1px solid $menu-border-color;
text-align: unset;
.mx_Tooltip_chevron {
display: unset;
}
}
.mx_Tooltip_title {
font-weight: var(--cpd-font-weight-semibold);
}
.mx_Tooltip_sub {
opacity: 0.7;
margin-top: 4px;
}