blob: 886fc03481638607f88986798856974b52a5edb5 [file] [log] [blame]
Hector Dearmanfcd63bc2018-10-11 11:40:43 +01001// Copyright (C) 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14:root {
15 --sidebar-width: 256px;
16 --topbar-height: 48px;
17 --monospace-font: 'Roboto Mono', monospace;
18}
19
20@mixin transition($time:0.1s) {
21 transition: opacity $time ease,
22 background-color $time ease,
23 width $time ease,
24 height $time ease,
25 max-width $time ease,
26 max-height $time ease,
27 margin $time ease,
28 border-radius $time ease;
29}
30
31@mixin material-icon($content) {
32 direction: ltr;
33 display: inline-block;
34 font-family: 'Material Icons';
35 font-size: 24px;
36 font-style: normal;
37 font-weight: normal;
38 letter-spacing: normal;
39 line-height: 1;
40 text-transform: none;
41 white-space: nowrap;
42 word-wrap: normal;
43 -webkit-font-feature-settings: 'liga';
44 -webkit-font-smoothing: antialiased;
45 content: $content;
46}
47
48* {
49 box-sizing: border-box;
50 overflow: hidden;
51 -webkit-tap-highlight-color: none;
52 touch-action: none;
53}
54
55html {
56 font-family: Roboto, verdana, sans-serif;
57 height: 100%;
58 width: 100%;
59}
60
61html,
62body {
63 height: 100%;
64 width: 100%;
65 padding: 0;
66 margin: 0;
67 user-select: none;
68}
69
70h1,
71h2,
72h3 {
73 font-family: initial;
74 font-size: initial;
75 font-weight: initial;
76 padding: 0;
77 margin: 0;
78}
79table {
80 user-select: text;
81}
82
83body {
84 display: grid;
85 grid-template-areas:
86 "sidebar topbar"
87 "sidebar page"
88 "sidebar alerts";
89 grid-template-rows: var(--topbar-height) 1fr auto;
90 grid-template-columns: var(--sidebar-width) auto;
91 color: #121212;
92}
93
94button {
95 background: none;
96 color: inherit;
97 border: none;
98 padding: 0;
99 font: inherit;
100 cursor: pointer;
101 outline: inherit;
102}
103
104button.close {
105 font-family: var(--monospace-font);
106}
107
108.full-page-loading-screen {
109 position: absolute;
110 background: #3e4a5a;
111 width: 100%;
112 height: 100%;
113 display: flex;
114 justify-content: center;
115 align-items: center;
116 flex-direction: row;
117 background-image: url('assets/logo.png');
118 background-attachment: fixed;
119 background-repeat: no-repeat;
120 background-position: center;
121}
122
123.page {
124 grid-area: page;
125 position: relative;
126}
127
128.alerts {
129 grid-area: alerts;
130 background-color: #262f3c;
131 div {
132 font-family: 'Raleway';
133 font-weight: 400;
134 letter-spacing: 0.25px;
135 color: white;
136 padding: 25px;
137 a {
138 color: white;
139 }
140 }
141}
142
143.home-page {
144 text-align: center;
145 padding-top: 20vh;
146}
147
148.home-page .logo {
149 width: 250px;
150}
151
152.home-page-title {
153 font-size: 60px;
154 margin: 25px;
155 text-align: center;
156 font-family: 'Raleway', sans-serif;
157 font-weight: 100;
158 color: #333;
159}
160
161.query-table {
162 width: 100%;
163 border-collapse: collapse;
164 font-size: 14px;
165 border: 0;
166 thead td {
167 background-color: hsl(214, 22%, 90%);
168 color: #262f3b;
169 text-align: center;
170 padding: 1px 3px;
171 border-style: solid;
172 border-color: #fff;
173 border-right-width: 1px;
174 border-left-width: 1px;
175 }
176 tbody tr {
177 @include transition();
178 background-color: hsl(214, 22%, 100%);
179 font-family: var(--monospace-font);
180 &:nth-child(even) {
181 background-color: hsl(214, 22%, 95%);
182 }
183 td:first-child {
184 padding-left: 5px;
185 }
186 td:last-child {
187 padding-right: 5px;
188 }
189 &:hover {
190 background-color: hsl(214, 22%, 90%);
191 }
192 }
193}
194
195.query-error {
196 padding: 20px 10px;
197 color: hsl(-10, 50%, 50%);
198 font-family: 'Google Sans';
199}
200
201.page header {
202 height: 25px;
203 line-height: 25px;
204 background-color: hsl(213, 22%, 82%);
205 color: hsl(213, 22%, 20%);
206 font-family: 'Google sans';
207 font-size: 15px;
208 font-weight: 400;
209 padding: 0 10px;
210 vertical-align: middle;
211 border-color: hsl(213, 22%, 75%);
212 border-style: solid;
213 border-top-width: 1px;
214 border-bottom-width: 1px;
215 .code {
216 font-family: var(--monospace-font);
217 font-size: 12px;
218 margin-left: 10px;
219 color: hsl(213, 22%, 40%);
220 }
221}
222
223.track {
224 display: grid;
225 grid-template-columns: auto 1fr;
226 grid-template-rows: 1fr;
227 border-top: 1px solid #c7d0db;
228 .track-shell {
229 padding: 0 20px;
230 display: grid;
231 grid-template-areas: "title pin up down";
232 grid-template-columns: 1fr auto auto;
233 align-items: center;
234 width: 300px;
235 background: #fff;
236 border-right: 1px solid #c7d0db;
237 h1 {
238 grid-area: title;
239 margin: 0;
240 font-size: 1em;
241 text-overflow: ellipsis;
242 font-family: 'Google Sans';
243 color: hsl(213, 22%, 30%);
244 }
245 .track-button {
246 margin: 0 5px;
247 color: #495767;
248 cursor: pointer;
249 width: 24px;
250 }
251 }
252}
253
254.scrolling-panel-container {
255 position: relative;
256 overflow-x: hidden;
257 overflow-y: auto;
258 flex: 1 1 auto;
259 will-change: transform; // Force layer creation.
260}
261
262.pinned-panel-container {
263 position: relative;
264 // Override top level overflow: hidden so height of this flex item can be
265 // its content height.
266 overflow: visible;
Hector Dearman8b73d202018-10-16 16:15:45 +0100267 border-bottom: 1px solid #262f3c;
Hector Dearmanfcd63bc2018-10-11 11:40:43 +0100268}
269
270// In the scrolling case, since the canvas is overdrawn and continuously
271// repositioned, we need the canvas to be in a div with overflow hidden and
272// height equaling the total height of the content to prevent scrolling
273// height from growing.
274.scroll-limiter {
275 overflow: hidden;
276 position: relative;
277}
278
279canvas.main-canvas {
280 top: 0px;
281 position: absolute;
282}
283
284.panel {
285 position: relative; // Otherwise canvas covers panel dom.
286}
287
288.pan-and-zoom-content {
289 height: 100%;
290 position: relative;
291 display: flex;
292 flex-flow: column nowrap;
293}
294
295.overview-timeline {
296 height: 100px;
297}
298
299.time-axis-panel {
300 height: 30px;
301}
302
303.flame-graph-panel {
304 height: 500px;
305}
306
307header {
308 height: 25px;
309}
310
311header.overview {
312 display: flex;
313 justify-content: space-between;
314}
315
316.query-error {
317 user-select: text;
318}
319
320span.code {
321 user-select: text;
322}
323
324.debug-panel-border {
325 position: absolute;
326 top: 0px;
327 height: 100%;
328 width: 100%;
329 border: 1px solid rgba(69, 187, 73, 0.5);
330 pointer-events: none;
331}
332
333.perf-stats {
334 --perfetto-orange: hsl(45, 100%, 48%);
335 --perfetto-red: hsl(6, 70%, 53%);
336 --stroke-color: hsl(217, 39%, 94%);
337 position: fixed;
338 bottom: 0;
339 color: var(--stroke-color);
340 font-family: monospace;
341 padding: 2px 0px;
342 z-index: 100;
343 button:hover {
344 color: var(--perfetto-red);
345 }
346 &[expanded=true] {
347 width: 600px;
348 background-color: rgba(27, 28, 29, 0.95);
349 button {
350 color: var(--perfetto-orange);
351 &:hover {
352 color: var(--perfetto-red);
353 }
354 }
355 }
356 &[expanded=false] {
357 width: var(--sidebar-width);
358 background-color: transparent;
359 }
360 i {
361 margin: 0px 24px;
362 font-size: 30px;
363 }
364 .perf-stats-content {
365 margin: 10px 24px;
366 & > section {
367 padding: 5px;
368 border-bottom: 1px solid var(--stroke-color);
369 }
370 button {
371 text-decoration: underline;
372 }
373 div {
374 margin: 2px 0px;
375 }
376 table, td, th {
377 border: 1px solid var(--stroke-color);
378 text-align: center;
379 padding: 4px;
380 margin: 4px 0px;
381 }
382 table {
383 border-collapse: collapse;
384 }
385 }
386}
387