Files
react-native-devtools-frontend/front_end/ui/tooltip.css
T
Erik Luo 395d55963b DevTools: avoid covering or hiding popover when tooltip is shown
- Adds 'pointer-events: none' so that hovering a tooltip does not
  cause a popover to blur and disappear.
- Accounts for cursor offset when positioning a tooltip above the
  cursor.
- Trims function tooltips everywhere to 500 chars.

Screenshots:
https://imgur.com/a/8mfMGXA
https://imgur.com/a/aWsRsKX

Bug: 806194
Change-Id: I64a479aa5d93b10ade286d59957c52df4997851c
Reviewed-on: https://chromium-review.googlesource.com/1072738
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#562521}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c68fece6362635a1d14b92c54f330f12d2998e47
2018-05-29 18:41:09 +00:00

51 lines
1.1 KiB
CSS

/*
* Copyright (c) 2015 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
.tooltip {
background: hsl(0, 0%, 95%);
border-radius: 2px;
color: hsl(0, 0%, 20%);
padding: 5px 8px;
line-height: 14px;
display: flex;
align-items: center;
-webkit-filter: drop-shadow(0 1px 2px hsla(0, 0%, 0%, 0.3));
border: 1px solid hsla(0, 0%, 0%, 0.1);
background-clip: padding-box;
box-sizing: border-box;
position: absolute;
visibility: hidden;
transition: visibility 0s 100ms, opacity 150ms cubic-bezier(0, 0, .2, 1);
z-index: 20001;
top: 0;
left: 0;
opacity: 0;
text-overflow: ellipsis;
overflow: hidden;
pointer-events: none;
}
.tooltip-breakword {
word-break: break-word;
}
.tooltip.shown {
visibility: visible;
transition-delay: 600ms;
opacity: 1;
}
.tooltip.shown.instant {
transition-delay: 0s;
}
.tooltip-shortcut {
color: hsl(0, 0%, 45%);
display: inline-block;
margin-left: 8px;
flex: 0 0 auto;
}