forked from firefox-devtools/profiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArrowPanel.css
More file actions
115 lines (100 loc) · 2.93 KB
/
ArrowPanel.css
File metadata and controls
115 lines (100 loc) · 2.93 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
.arrowPanelAnchor {
position: absolute;
z-index: var(--z-arrow-panel);
top: 75%;
left: 50%;
}
.arrowPanel {
--internal-offset-from-right: var(--offset-from-right, 60px);
--internal-offset-from-top: 15px;
--internal-width: var(--width, initial);
--internal-button-height: 30px;
--internal-background-color: hsl(0deg 0% 97%);
--internal-border-color: rgb(0 0 0 / 0.25);
--internal-shadow-color: rgb(0 0 0 / 0.35);
position: absolute;
top: var(--internal-offset-from-top);
right: calc(var(--internal-offset-from-right) * -1);
min-width: var(--internal-width);
border: 0.5px solid var(--internal-border-color);
border-radius: 5px;
background: var(--internal-background-color);
background-clip: padding-box;
box-shadow: 0 8px 12px var(--internal-shadow-color);
color: var(--base-foreground-color);
line-height: 1.3;
text-align: left;
transform-origin: calc(100% - var(--internal-offset-from-right))
calc(var(--internal-offset-from-top) * -1);
}
.arrowPanel:not(.open) {
opacity: 0;
pointer-events: none;
/* The visibility is set to hidden after the panel closing transition. */
transition:
opacity 200ms ease-out,
visibility 0s 200ms;
/* visibility: hidden hides the panel from the accessibility tree when it's closed */
visibility: hidden;
}
:root.dark-mode {
.arrowPanel {
--internal-background-color: var(--menu-background-color);
--internal-border-color: var(--grey-60);
--internal-shadow-color: rgb(0 0 0 / 0.4);
}
}
.arrowPanel.open {
animation: arrowPanelAppear 200ms cubic-bezier(0.07, 0.95, 0, 1);
}
@media (prefers-reduced-motion) {
.arrowPanel.open {
animation: none;
opacity: 1;
}
}
@keyframes arrowPanelAppear {
from {
opacity: 0;
transform: translateY(-25px);
}
to {
opacity: 1;
transform: none;
}
}
.arrowPanelArrow {
position: absolute;
top: calc(var(--internal-offset-from-top) * -1);
right: 0;
left: 0;
overflow: hidden;
height: var(--internal-offset-from-top);
}
.arrowPanelArrow::before {
position: absolute;
top: 0;
left: calc(100% - var(--internal-offset-from-right));
display: block;
width: calc(1.42 * var(--internal-offset-from-top));
height: calc(1.42 * var(--internal-offset-from-top));
border: 0.5px solid var(--internal-border-color);
background: var(--internal-background-color);
background-clip: padding-box;
content: '';
transform: rotate(45deg);
transform-origin: top left;
}
.arrowPanelContent {
overflow: auto;
max-height: calc(
100vh - var(--internal-approx-distance-from-top) -
var(--internal-button-height) - var(--internal-approx-distance-to-bottom)
);
padding: 16px;
--internal-approx-distance-from-top: 60px;
--internal-approx-distance-to-bottom: 100px;
}