1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 17:28:51 +02:00
phorge-phorge/webroot/rsrc/css/aphront/tooltip.css
epriestley 49b03c0353 Improve tooltip behavior for Application menu items
Summary:
Ref T12174.

  - Fix text antialiasing pop-in at the end of the animation in Safari.
  - Fix flickery animation replay when mousing inside a tooltip element, or rapidly switching between tooltip elements.
    - To accomplish this: don't play the animation if the last tip was hidden less than 500ms ago.

Test Plan:
  - Viewed a tooltip in Safari.
  - Waved cursor wildly over application items, both left-right (within an item) and up-down (between items).

Tooltips appeared stable and non-flickery in all cases.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12174

Differential Revision: https://secure.phabricator.com/D17272
2017-01-31 09:19:17 -08:00

101 lines
1.6 KiB
CSS

/**
* @provides aphront-tooltip-css
*/
.jx-tooltip-container {
position: absolute;
padding: 5px;
}
.jx-tooltip-appear {
animation: 0.5s tooltip-appear;
/* Without this, there's a nasty pop-in effect at the end of the animation
when Safari changes font smoothing. The text becomes visibly more bold
after the last frame of animation. */
-webkit-font-smoothing: subpixel-antialiased;
}
@keyframes tooltip-appear {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.jx-tooltip-hidden {
opacity: 0;
}
.jx-tooltip-inner {
position: relative;
background: #000;
border-radius: 3px;
}
.jx-tooltip {
color: #f9f9f9;
font-size: {$normalfontsize};
-webkit-font-smoothing: antialiased;
padding: 6px 8px;
overflow: hidden;
white-space: pre-wrap;
}
.jx-tooltip:after {
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-color: rgba({$alphablack}, 0);
border-width: 5px;
}
.jx-tooltip-align-E {
margin-left: 5px;
}
.jx-tooltip-align-E .jx-tooltip:after {
margin-top: -5px;
border-right-color: #000;
right: 100%;
top: 50%;
}
.jx-tooltip-align-E {
margin-right: 5px;
}
.jx-tooltip-align-W .jx-tooltip:after {
margin-top: -5px;
border-left-color: #000;
left: 100%;
top: 50%;
}
.jx-tooltip-align-N {
margin-bottom: 5px;
}
.jx-tooltip-align-N .jx-tooltip:after {
margin-left: -5px;
border-top-color: #000;
top: 100%;
left: 50%;
}
.jx-tooltip-align-N {
margin-top: 5px;
}
.jx-tooltip-align-S .jx-tooltip:after {
margin-left: -5px;
border-bottom-color: #000;
bottom: 100%;
left: 50%;
}