1// 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 15@import "widgets/theme"; 16@import "typefaces"; 17@import "fonts"; 18 19:root { 20 --sidebar-width: 230px; 21 --topbar-height: 44px; 22 --monospace-font: "Roboto Mono", monospace; 23 --track-shell-width: 250px; 24 --track-border-color: #00000025; 25 --anim-easing: cubic-bezier(0.4, 0, 0.2, 1); 26 --selection-stroke-color: #00344596; 27 --selection-fill-color: #8398e64d; 28 --overview-timeline-non-visible-color: #c8c8c8cc; 29 --details-content-height: 280px; 30 --collapsed-background: hsla(190, 49%, 97%, 1); 31 --expanded-background: hsl(215, 22%, 19%); 32} 33 34@mixin transition($time: 0.1s) { 35 transition: opacity $time ease, color $time ease, background-color $time ease, 36 border-color $time ease, width $time ease, height $time ease, 37 max-width $time ease, max-height $time ease, margin $time ease, 38 transform $time ease, box-shadow $time ease, border-radius $time ease; 39} 40 41@mixin material-icon($content) { 42 @include icon; 43 content: $content; 44} 45 46* { 47 box-sizing: border-box; 48 -webkit-tap-highlight-color: transparent; 49 touch-action: none; 50} 51 52html { 53 font-family: Roboto, verdana, sans-serif; 54 height: 100%; 55 width: 100%; 56} 57 58html, 59body, 60body > main { 61 height: 100%; 62 width: 100%; 63 padding: 0; 64 margin: 0; 65 overscroll-behavior: none; 66 overflow: hidden; 67} 68 69pre, 70code { 71 font-family: var(--monospace-font); 72} 73 74// This is to minimize Mac vs Linux Chrome Headless rendering differences 75// when running UI intergrationtests via puppeteer. 76body.testing { 77 -webkit-font-smoothing: antialiased !important; 78 font-kerning: none !important; 79} 80 81h1, 82h2, 83h3 { 84 font-family: inherit; 85 font-size: inherit; 86 font-weight: inherit; 87 padding: 0; 88 margin: 0; 89} 90table { 91 user-select: text; 92} 93 94body > main { 95 display: grid; 96 grid-template-areas: 97 "sidebar topbar" 98 "sidebar alerts" 99 "sidebar page"; 100 grid-template-rows: auto auto 1fr; 101 grid-template-columns: auto 1fr; 102 color: #121212; 103 overflow: hidden; 104} 105 106body.filedrag::after { 107 content: "Drop the trace file to open it"; 108 position: fixed; 109 z-index: 99; 110 top: 0; 111 left: 0; 112 right: 0; 113 bottom: 0; 114 border: 10px dashed #404854; 115 text-align: center; 116 font-size: 3rem; 117 line-height: 100vh; 118 color: #333; 119 background: rgba(255, 255, 255, 0.5); 120} 121 122button { 123 background: none; 124 color: inherit; 125 border: none; 126 padding: 0; 127 font: inherit; 128 cursor: pointer; 129 outline: inherit; 130} 131 132button.close { 133 font-family: var(--monospace-font); 134} 135 136.full-page-loading-screen { 137 position: absolute; 138 width: 100%; 139 height: 100%; 140 display: flex; 141 justify-content: center; 142 align-items: center; 143 flex-direction: row; 144 background: #3e4a5a url("assets/logo-3d.png") no-repeat fixed center; 145} 146 147.page { 148 grid-area: page; 149} 150 151.alerts { 152 grid-area: alerts; 153 background-color: #f2f2f2; 154 > div { 155 font-family: "Roboto", sans-serif; 156 font-weight: 400; 157 letter-spacing: 0.25px; 158 padding: 1rem; 159 display: flex; 160 justify-content: space-between; 161 align-items: center; 162 button { 163 width: 24px; 164 height: 24px; 165 } 166 } 167} 168 169@mixin table-font-size { 170 font-size: 14px; 171 line-height: 18px; 172} 173 174$table-hover-color: hsl(214, 22%, 90%); 175 176$table-border-color: rgba(60, 76, 92, 0.4); 177 178$bottom-tab-padding: 10px; 179 180@mixin table-component { 181 @include bottom-panel-font; 182 @include table-font-size; 183 184 width: 100%; 185 border-collapse: collapse; 186 187 thead { 188 font-weight: normal; 189 } 190 191 tr:hover td { 192 background-color: $table-hover-color; 193 } 194 195 tr.header { 196 border-bottom: 1px solid $table-border-color; 197 text-align: center; 198 } 199 200 td { 201 padding: 3px 5px; 202 white-space: nowrap; 203 204 i.material-icons { 205 // Shrink the icons inside the table cells to increase the information 206 // density a little bit. 207 font-size: 16px; 208 } 209 } 210} 211 212.generic-table { 213 @include table-component; 214} 215 216.pivot-table { 217 @include table-component; 218 219 thead, 220 i { 221 cursor: pointer; 222 } 223 td.first { 224 border-left: 1px solid $table-border-color; 225 padding-left: 6px; 226 } 227 thead td.reorderable-cell { 228 cursor: grab; 229 } 230 .disabled { 231 cursor: default; 232 } 233 .indent { 234 display: inline-block; 235 // 16px is the width of expand_more/expand_less icon to pad out cells 236 // without the button 237 width: 16px; 238 } 239 strong { 240 font-weight: 400; 241 } 242} 243 244.pf-query-panel { 245 display: contents; 246 .pf-query-warning { 247 padding: 4px; 248 position: sticky; 249 left: 0; 250 } 251} 252 253.pf-query-table { 254 min-width: 100%; 255 font-size: 14px; 256 border: 0; 257 thead td { 258 position: sticky; 259 top: 0; 260 background-color: hsl(214, 22%, 90%); 261 color: #262f3c; 262 text-align: center; 263 padding: 1px 3px; 264 border-style: solid; 265 border-color: #fff; 266 border-right-width: 1px; 267 border-left-width: 1px; 268 } 269 tbody tr { 270 @include transition(); 271 background-color: hsl(214, 22%, 100%); 272 font-family: var(--monospace-font); 273 &:nth-child(even) { 274 background-color: hsl(214, 22%, 95%); 275 } 276 td:first-child { 277 padding-left: 5px; 278 } 279 td:last-child { 280 padding-right: 5px; 281 } 282 &:hover { 283 background-color: hsl(214, 22%, 90%); 284 } 285 &[clickable] { 286 cursor: pointer; 287 &:active { 288 background-color: hsl(206, 19%, 75%); 289 box-shadow: inset 1px 1px 4px #00000040; 290 transition: none; 291 } 292 } 293 } 294} 295 296.query-error { 297 padding: 20px 10px; 298 color: hsl(-10, 50%, 50%); 299 font-family: "Roboto Mono", sans-serif; 300 font-size: 12px; 301 font-weight: 300; 302 white-space: pre; 303} 304 305.dropdown { 306 display: inline-block; 307 position: relative; 308} 309 310.dropdown-button { 311 cursor: pointer; 312} 313 314.popup-menu { 315 position: absolute; 316 background-color: white; 317 right: 0; 318 box-shadow: 0 0 4px 0 #999; 319 /* TODO(hjd): Reduce and make z-index use sensible. */ 320 z-index: 1000; 321 322 &.closed { 323 display: none; 324 } 325 326 &.opened { 327 display: block; 328 } 329 330 button.open-menu { 331 border-radius: 0; 332 margin: 0; 333 height: auto; 334 background: transparent; 335 color: #111; 336 font-size: 12px; 337 padding: 0.4em 1em; 338 white-space: nowrap; 339 width: 100%; 340 text-align: right; 341 line-height: 1; 342 display: block; // Required in order for inherited white-space property not 343 // to screw up vertical rendering of the popup menu items. 344 345 &:hover { 346 background: #c7d0db; 347 } 348 } 349 350 .nested-menu { 351 padding-right: 1em; 352 } 353} 354 355.x-scrollable { 356 overflow-x: auto; 357} 358 359header.overview { 360 position: sticky; 361 top: 0; 362 left: 0; 363 display: flex; 364 align-content: baseline; 365 background-color: hsl(213, 22%, 82%); 366 color: hsl(213, 22%, 20%); 367 font-family: "Roboto Condensed", sans-serif; 368 font-size: 15px; 369 font-weight: 400; 370 padding: 4px 10px; 371 vertical-align: middle; 372 border-color: hsl(213, 22%, 75%); 373 border-style: solid; 374 border-width: 1px 0; 375 .code { 376 font-family: var(--monospace-font); 377 font-size: 12px; 378 margin-left: 10px; 379 color: hsl(213, 22%, 40%); 380 } 381 span { 382 white-space: nowrap; 383 } 384 span.code { 385 text-overflow: ellipsis; 386 max-width: 50vw; 387 overflow: hidden; 388 } 389 span.spacer { 390 flex-grow: 1; 391 } 392} 393 394.text-select { 395 user-select: text; 396} 397 398button.query-ctrl { 399 background: #262f3c; 400 color: white; 401 border-radius: 10px; 402 font-size: 10px; 403 height: 18px; 404 line-height: 18px; 405 min-width: 7em; 406 margin: auto 0 auto 1rem; 407} 408 409.perf-stats { 410 --stroke-color: hsl(217, 39%, 94%); 411 position: fixed; 412 bottom: 0; 413 left: 0; 414 width: 600px; 415 color: var(--stroke-color); 416 font-family: var(--monospace-font); 417 padding: 10px 24px; 418 z-index: 100; 419 background-color: rgba(27, 28, 29, 0.9); 420 button { 421 text-decoration: underline; 422 color: hsl(45, 100%, 48%); 423 &:hover { 424 color: hsl(6, 70%, 53%); 425 } 426 } 427 .close-button { 428 position: absolute; 429 right: 20px; 430 top: 10px; 431 width: 20px; 432 height: 20px; 433 color: var(--stroke-color); 434 } 435 & > section { 436 padding: 5px; 437 border-bottom: 1px solid var(--stroke-color); 438 } 439 div { 440 margin: 2px 0; 441 } 442 table, 443 td, 444 th { 445 border: 1px solid var(--stroke-color); 446 text-align: center; 447 padding: 4px; 448 margin: 4px 0; 449 } 450 table { 451 border-collapse: collapse; 452 } 453} 454 455.cookie-consent { 456 position: absolute; 457 z-index: 10; 458 left: 10px; 459 bottom: 10px; 460 width: 550px; 461 background-color: #19212b; 462 font-size: 14px; 463 color: rgb(180, 183, 186); 464 border-radius: 5px; 465 padding: 20px; 466 467 .buttons { 468 display: flex; 469 justify-content: flex-end; 470 margin-top: 10px; 471 font-size: 15px; 472 } 473 474 button { 475 padding: 10px; 476 border-radius: 3px; 477 color: #fff; 478 margin-left: 5px; 479 a { 480 text-decoration: none; 481 color: #fff; 482 } 483 } 484 button:hover { 485 background-color: #373f4b; 486 cursor: pointer; 487 } 488} 489 490.disallow-selection { 491 user-select: none; 492} 493 494.pivot-table { 495 user-select: text; 496 padding: $bottom-tab-padding; 497 498 button.mode-button { 499 border-radius: 10px; 500 padding: 7px; 501 margin: 5px; 502 background-color: #c7d0db; 503 } 504 505 &.query-error { 506 color: red; 507 } 508 509 .total-values { 510 text-align: right; 511 padding-right: 10px; 512 } 513 514 .empty-result { 515 padding: 10px; 516 } 517 518 td.menu { 519 text-align: left; 520 } 521 522 td { 523 // In context menu icon to go on a separate line. 524 // In regular pivot table cells, avoids wrapping the icon spacer to go on 525 // a separate line. 526 white-space: pre; 527 } 528} 529 530.name-completion { 531 input { 532 width: 90%; 533 } 534 min-height: 20vh; 535 min-width: 30vw; 536 537 .arguments-popup-sizer { 538 color: transparent; 539 user-select: none; 540 height: 0; 541 } 542} 543 544.reorderable-cell { 545 &.dragged { 546 color: gray; 547 } 548 549 &.highlight-left { 550 background: linear-gradient(90deg, $table-border-color, transparent 20%); 551 } 552 553 &.highlight-right { 554 background: linear-gradient(270deg, $table-border-color, transparent 20%); 555 } 556} 557 558.history-item { 559 border-bottom: 1px solid hsl(213, 22%, 75%); 560 padding: 0.25em 0.5em; 561 max-height: 150px; 562 overflow-y: auto; 563 position: relative; 564 565 pre { 566 font-size: 10pt; 567 margin: 0; 568 overflow-x: auto; 569 overflow-y: hidden; 570 white-space: pre-wrap; 571 position: relative; 572 cursor: pointer; 573 574 &:hover::after { 575 content: "Doubleclick to re-run"; 576 font-size: 12px; 577 color: rgba(0, 0, 0, 20%); 578 position: absolute; 579 top: 0; 580 margin: auto; 581 right: 0; 582 } 583 } 584 585 &:hover { 586 background-color: hsl(213, 22%, 94%); 587 .history-item-buttons { 588 visibility: visible; 589 } 590 } 591} 592 593.history-item-buttons { 594 position: sticky; 595 float: right; 596 top: 0; 597 visibility: hidden; 598 599 button { 600 margin: 0 0.5rem; 601 602 i.material-icons, 603 i.material-icons-filled { 604 font-size: 18px; 605 } 606 } 607} 608 609.context-wrapper { 610 white-space: nowrap; 611 612 i.material-icons { 613 margin-left: 0; 614 } 615} 616