summaryrefslogtreecommitdiff
path: root/chromium/v8/tools/system-analyzer/view/tool-tip-template.html
blob: dc56997825f6deb4c5c2e88daabc40b8b45dbbf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!-- Copyright 2020 the V8 project authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<head>
  <link href="./index.css" rel="stylesheet">
</head>
<style>
  :host {
    position: absolute;
    z-index: 100;
  }

  #content {
    background-color: var(--surface-color);
    border: 3px var(--primary-color) solid;
    border-radius: 10px;
    min-width: 100px;
    min-height: 100px;
    padding: 10px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
    width: auto;
  }

  .textContent {
    font-family: monospace;
    white-space: pre;
    overflow-wrap: anywhere;
    overflow-x: hidden;
    max-width: 500px;
  }

  #body {
    display: none;
    position: absolute;
    --tip-offset: 10px;
    --tip-width: 10px;
    --tip-height: 15px;
  }

  #body.top {
    bottom: var(--tip-height);
  }
  #body.bottom {
    top: var(--tip-height);
  }
  #body.left {
    right: calc(var(--tip-offset) * -1 - var(--tip-width));
  }
  #body.right {
    left: calc(var(--tip-offset) * -1 - var(--tip-width));
  }

  .tip {
    width: 0;
    height: 0;
    border-style: solid;
    position: absolute;
    border-width: var(--tip-height) var(--tip-width) 0 var(--tip-width);
    border-color:  var(--primary-color) transparent transparent transparent;
    pointer-events: none;
  }

  .top > .tip {
    bottom: calc(var(--tip-height) * -1);
  }
  .bottom > .tip {
    top: calc(var(--tip-height) * -1);
    transform: scaleY(-1);
  }
  .left > .tip {
    right: var(--tip-offset);
  }
  .right > .tip {
    left: var(--tip-offset);
  }
</style>

<div id="body">
  <div id="content">
  </div>
  <div class="tip"></div>
</div>