mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
We scale the tippy arrows to the same size as used by the tippyjs documentation for the small arrow size example. Part of #21753
59 lines
1.7 KiB
CSS
59 lines
1.7 KiB
CSS
[data-tippy-root] {
|
|
/* Since tooltip elements are sometimes inside elements
|
|
* which have different font-family, we force font-family
|
|
* for tooltips here.
|
|
*/
|
|
font-family: "Source Sans 3", sans-serif !important;
|
|
word-wrap: break-word;
|
|
|
|
/* Affects all tippy tooltips not using any theme. */
|
|
.tippy-box:not([data-theme]) {
|
|
background: hsla(0, 0%, 20%, 1);
|
|
border-radius: 5px;
|
|
|
|
> .tippy-content {
|
|
display: inline-block;
|
|
padding: 5px 10px;
|
|
font-size: 14px;
|
|
line-height: 15px;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
&[data-placement^="top"] > .tippy-arrow::before {
|
|
border-top-color: hsla(0, 0%, 20%, 1);
|
|
}
|
|
|
|
&[data-placement^="bottom"] > .tippy-arrow::before {
|
|
border-bottom-color: hsla(0, 0%, 20%, 1);
|
|
}
|
|
|
|
&[data-placement^="left"] > .tippy-arrow::before {
|
|
border-left-color: hsla(0, 0%, 20%, 1);
|
|
}
|
|
|
|
&[data-placement^="right"] > .tippy-arrow::before {
|
|
border-right-color: hsla(0, 0%, 20%, 1);
|
|
}
|
|
}
|
|
|
|
.tippy-arrow::before {
|
|
/* `.tippy-arrow:before` element sometimes
|
|
* inherits the height of the parent, we
|
|
* don't want any height here since we
|
|
* want it to remain an triangle.
|
|
* The bug was only found in Firefox.
|
|
*/
|
|
height: 0 !important;
|
|
/* We use the same transform value used
|
|
* by tippyjs documentation for the small
|
|
* arrow size.
|
|
*/
|
|
transform: scale(0.75);
|
|
}
|
|
/* If the text in the tooltips stretches to multiple lines,
|
|
* we want the lines to be left-indented and not right-indented
|
|
* by default.
|
|
*/
|
|
text-align: left;
|
|
}
|