Home | History | Annotate | Download | only in assets
      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 :root {
     15     --sidebar-width: 256px;
     16     --topbar-height: 48px;
     17     --monospace-font: 'Roboto Mono', monospace;
     18     --track-shell-width: 250px;
     19     --track-border-color: #00000025;
     20 }
     21 
     22 @mixin transition($time:0.1s) {
     23     transition: opacity $time ease,
     24                 color $time ease,
     25                 background-color $time ease,
     26                 border-color $time ease,
     27                 width $time ease,
     28                 height $time ease,
     29                 max-width $time ease,
     30                 max-height $time ease,
     31                 margin $time ease,
     32                 transform $time ease,
     33                 box-shadow $time ease,
     34                 border-radius $time ease;
     35 }
     36 
     37 @mixin material-icon($content) {
     38     direction: ltr;
     39     display: inline-block;
     40     font-family: 'Material Icons';
     41     font-size: 24px;
     42     font-style: normal;
     43     font-weight: normal;
     44     letter-spacing: normal;
     45     line-height: 1;
     46     text-transform: none;
     47     white-space: nowrap;
     48     word-wrap: normal;
     49     -webkit-font-feature-settings: 'liga';
     50     -webkit-font-smoothing: antialiased;
     51     content: $content;
     52 }
     53 
     54 * {
     55     box-sizing: border-box;
     56     overflow: hidden;
     57     -webkit-tap-highlight-color: none;
     58     touch-action: none;
     59 }
     60 
     61 html {
     62     font-family: Roboto, verdana, sans-serif;
     63     height: 100%;
     64     width: 100%;
     65 }
     66 
     67 html,
     68 body {
     69     height: 100%;
     70     width: 100%;
     71     padding: 0;
     72     margin: 0;
     73     user-select: none;
     74 }
     75 
     76 h1,
     77 h2,
     78 h3 {
     79     font-family: initial;
     80     font-size: initial;
     81     font-weight: initial;
     82     padding: 0;
     83     margin: 0;
     84 }
     85 table {
     86     user-select: text;
     87 }
     88 
     89 body {
     90     display: grid;
     91     grid-template-areas:
     92       "sidebar topbar"
     93       "sidebar alerts"
     94       "sidebar page";
     95     grid-template-rows: var(--topbar-height) auto 1fr;
     96     grid-template-columns: var(--sidebar-width) auto;
     97     color: #121212;
     98 }
     99 
    100 button {
    101   background: none;
    102   color: inherit;
    103   border: none;
    104   padding: 0;
    105   font: inherit;
    106   cursor: pointer;
    107   outline: inherit;
    108 }
    109 
    110 button.close {
    111   font-family: var(--monospace-font);
    112 }
    113 
    114 .full-page-loading-screen {
    115     position: absolute;
    116     background: #3e4a5a;
    117     width: 100%;
    118     height: 100%;
    119     display: flex;
    120     justify-content: center;
    121     align-items: center;
    122     flex-direction: row;
    123     background-image: url('assets/logo.png');
    124     background-attachment: fixed;
    125     background-repeat: no-repeat;
    126     background-position: center;
    127 }
    128 
    129 .page {
    130     grid-area: page;
    131     position: relative;
    132     display: flex;
    133     flex-direction: column
    134 }
    135 
    136 .alerts {
    137   * {
    138     user-select: text;
    139   }
    140   grid-area: alerts;
    141   background-color: #f2f2f2;
    142   >div {
    143     font-family: 'Raleway';
    144     font-weight: 400;
    145     letter-spacing: 0.25px;
    146     padding: 1rem;
    147     display: flex;
    148     justify-content: space-between;
    149     button {
    150       width: 24px;
    151       height: 24px;
    152     }
    153 
    154   }
    155 }
    156 
    157 .home-page {
    158     text-align: center;
    159     padding-top: 20vh;
    160     align-items: center;
    161 }
    162 
    163 .home-page .logo {
    164     width: var(--track-shell-width);
    165 }
    166 
    167 .home-page-title {
    168     font-size: 60px;
    169     margin: 25px;
    170     text-align: center;
    171     font-family: 'Raleway', sans-serif;
    172     font-weight: 100;
    173     color: #333;
    174 }
    175 
    176 .query-table {
    177     width: 100%;
    178     border-collapse: collapse;
    179     font-size: 14px;
    180     border: 0;
    181     thead td {
    182         background-color: hsl(214, 22%, 90%);
    183         color: #262f3c;
    184         text-align: center;
    185         padding: 1px 3px;
    186         border-style: solid;
    187         border-color: #fff;
    188         border-right-width: 1px;
    189         border-left-width: 1px;
    190     }
    191     tbody tr {
    192         @include transition();
    193         background-color: hsl(214, 22%, 100%);
    194         font-family: var(--monospace-font);
    195         &:nth-child(even) {
    196             background-color: hsl(214, 22%, 95%);
    197         }
    198         td:first-child {
    199             padding-left: 5px;
    200         }
    201         td:last-child {
    202             padding-right: 5px;
    203         }
    204         &:hover {
    205             background-color: hsl(214, 22%, 90%);
    206         }
    207     }
    208 }
    209 
    210 .query-error {
    211     padding: 20px 10px;
    212     color: hsl(-10, 50%, 50%);
    213     font-family: 'Google Sans';
    214 }
    215 
    216 .page header {
    217     background-color: hsl(213, 22%, 82%);
    218     color: hsl(213, 22%, 20%);
    219     font-family: 'Google sans';
    220     font-size: 15px;
    221     font-weight: 400;
    222     padding: 4px 10px;
    223     vertical-align: middle;
    224     border-color: hsl(213, 22%, 75%);
    225     border-style: solid;
    226     border-width: 1px 0;
    227     .code {
    228         font-family: var(--monospace-font);
    229         font-size: 12px;
    230         margin-left: 10px;
    231         color: hsl(213, 22%, 40%);
    232     }
    233 }
    234 
    235 .track {
    236     display: grid;
    237     grid-template-columns: auto 1fr;
    238     grid-template-rows: 1fr 0;
    239 
    240     &::after {
    241       display: block;
    242       content: '';
    243       grid-column: 1 / span 2;
    244       border-top: 1px solid var(--track-border-color);
    245       margin-top: -1px;
    246     }
    247 
    248     .track-shell {
    249         @include transition();
    250         padding: 0 10px;
    251         display: grid;
    252         grid-template-areas: "title pin";
    253         grid-template-columns: 1fr auto auto;
    254         align-items: center;
    255         width: var(--track-shell-width);
    256         background: #fff;
    257         border-right: 1px solid #c7d0db;
    258 
    259         &.drag {
    260           background-color: #eee;
    261           box-shadow: 0 4px 12px -4px #999 inset;
    262         }
    263         &.drop-before {
    264           box-shadow: 0 4px 2px -1px hsl(213, 40%, 50%) inset;
    265         }
    266         &.drop-after {
    267           box-shadow: 0 -4px 2px -1px hsl(213, 40%, 50%) inset;
    268         }
    269 
    270         h1 {
    271             grid-area: title;
    272             margin: 0;
    273             font-size: 14px;
    274             text-overflow: ellipsis;
    275             text-align: left;
    276             direction: rtl;
    277             font-family: 'Google Sans';
    278             color: hsl(213, 22%, 30%);
    279         }
    280         .track-button {
    281           @include transition();
    282           margin: 0 5px;
    283           color: #495767;
    284           cursor: pointer;
    285           width: 24px;
    286           opacity: 0;
    287         }
    288 
    289         &:hover .track-button{
    290           opacity: 1;
    291         }
    292     }
    293 }
    294 
    295 .scrolling-panel-container {
    296   position: relative;
    297   overflow-x: hidden;
    298   overflow-y: auto;
    299   flex: 1 1 auto;
    300   will-change: transform;  // Force layer creation.
    301 }
    302 
    303 .pinned-panel-container {
    304   position: relative;
    305   // Override top level overflow: hidden so height of this flex item can be
    306   // its content height.
    307   overflow: visible;
    308   box-shadow: 1px 3px 15px rgba(23, 32, 44, 0.3);
    309   z-index: 2;
    310 }
    311 
    312 // In the scrolling case, since the canvas is overdrawn and continuously
    313 // repositioned, we need the canvas to be in a div with overflow hidden and
    314 // height equaling the total height of the content to prevent scrolling
    315 // height from growing.
    316 .scroll-limiter {
    317   overflow: hidden;
    318   position: relative;
    319 }
    320 
    321 canvas.main-canvas {
    322   top: 0px;
    323   z-index: -1;
    324   position: absolute;
    325 }
    326 
    327 .panel {
    328   position: relative;  // Otherwise canvas covers panel dom.
    329 }
    330 
    331 .pan-and-zoom-content {
    332   flex: 1;
    333   position: relative;
    334   display: flex;
    335   flex-flow: column nowrap;
    336 }
    337 
    338 .details-content {
    339   display: grid;
    340   grid-template-rows: auto 1fr;
    341 
    342   .handle {
    343     background-color: hsl(215, 1%, 95%);
    344     border: 1px solid rgba(0,0,0,0.1);
    345     cursor: row-resize;
    346     height: 28px;
    347     min-height: 28px;
    348 
    349     i.material-icons {
    350       font-size: 24px;
    351       float: right;
    352       vertical-align: middle;
    353       margin-right: 5px;
    354       margin-top: 1px;
    355       &:hover{
    356         cursor: pointer;
    357       }
    358     }
    359 
    360     .handle-title {
    361       float: left;
    362       font-family: 'Google Sans';
    363       color: #3c4b5d;
    364       margin-left: 5px;
    365       padding: 5px;
    366       font-size: 13px;
    367     }
    368   }
    369 
    370   .details-panel-container {
    371     .scroll-limiter {
    372       height: 100%;
    373       display: flex;
    374       flex-direction: column;
    375       .panel:last-child {
    376         flex-grow: 1;
    377       }
    378     }
    379   }
    380 }
    381 
    382 .overview-timeline {
    383   height: 100px;
    384 }
    385 
    386 .time-axis-panel {
    387   height: 12px;
    388 }
    389 
    390 .details-panel {
    391   padding: 10px;
    392   font-family: 'Google Sans';
    393   color: #3c4b5d;
    394 
    395   .details-panel-heading {
    396     font-size: 16px;
    397     padding-bottom: 5px;
    398   }
    399 
    400   table {
    401     font-size: 14px;
    402     width: 50%;
    403     min-width: 200px;
    404     max-width: 50%;
    405     table-layout: fixed;
    406     word-wrap: break-word;
    407     tr:hover {
    408       background-color: hsl(214, 22%, 90%);
    409     }
    410     th {
    411       text-align: left;
    412       width: 30%;
    413       font-weight: normal;
    414     }
    415   }
    416 
    417 }
    418 
    419 .notes-panel {
    420   height: 20px;
    421 }
    422 
    423 .notes-editor-panel {
    424   padding: 10px;
    425   display: flex;
    426   flex-direction: column;
    427   height: 100%;
    428   font-family: 'Google Sans';
    429   color: #3c4b5d;
    430 
    431   .notes-editor-panel-heading-bar {
    432     display: flex;
    433     padding-bottom: 8px;
    434     font-size: 14px;
    435     .notes-editor-panel-heading {
    436       padding-top: 3px;
    437     }
    438     input {
    439       vertical-align: middle;
    440     }
    441   }
    442 
    443   button {
    444    background: #262f3c;
    445    color: white;
    446    border-radius: 10px;
    447    font-size: 10px;
    448    height: 22px;
    449    line-height: 18px;
    450    min-width: 7em;
    451    margin: auto 0 auto 1rem;
    452   }
    453 
    454   input[type=text] {
    455     flex-grow: 1;
    456     border-radius: 4px;
    457     border:1px solid #dcdcdc;
    458     padding: 3px;
    459     margin: 0 10px;
    460     &:focus {
    461       outline: none;
    462       box-shadow: 1px 1px 1px rgba(23, 32, 44, 0.3);
    463     }
    464   }
    465 }
    466 
    467 .flame-graph-panel {
    468   height: 500px;
    469 }
    470 
    471 header.overview {
    472   display: flex;
    473   align-content: center;
    474 
    475   span.code {
    476     user-select: text;
    477     flex-grow: 1;
    478   }
    479 }
    480 
    481 .query-error {
    482   user-select: text;
    483 }
    484 
    485 button.query-ctrl {
    486   background: #262f3c;
    487   color: white;
    488   border-radius: 10px;
    489   font-size: 10px;
    490   height: 18px;
    491   line-height: 18px;
    492   min-width: 7em;
    493   margin: auto 0 auto 1rem;
    494 }
    495 
    496 .debug-panel-border {
    497   position: absolute;
    498   top: 0px;
    499   height: 100%;
    500   width: 100%;
    501   border: 1px solid rgba(69, 187, 73, 0.5);
    502   pointer-events: none;
    503 }
    504 
    505 .perf-stats {
    506   --perfetto-orange: hsl(45, 100%, 48%);
    507   --perfetto-red: hsl(6, 70%, 53%);
    508   --stroke-color: hsl(217, 39%, 94%);
    509   position: fixed;
    510   bottom: 0;
    511   color: var(--stroke-color);
    512   font-family: monospace;
    513   padding: 2px 0px;
    514   z-index: 100;
    515   button:hover {
    516     color: var(--perfetto-red);
    517   }
    518   &[expanded=true] {
    519     width: 600px;
    520     background-color: rgba(27, 28, 29, 0.95);
    521     button {
    522       color: var(--perfetto-orange);
    523       &:hover {
    524         color: var(--perfetto-red);
    525       }
    526     }
    527   }
    528   &[expanded=false] {
    529     width: var(--sidebar-width);
    530     background-color: transparent;
    531   }
    532   i {
    533     margin: 0px 24px;
    534     font-size: 30px;
    535   }
    536   .perf-stats-content {
    537     margin: 10px 24px;
    538     & > section {
    539       padding: 5px;
    540       border-bottom: 1px solid var(--stroke-color);
    541     }
    542     button {
    543       text-decoration: underline;
    544     }
    545     div {
    546       margin: 2px 0px;
    547     }
    548     table, td, th {
    549       border: 1px solid var(--stroke-color);
    550       text-align: center;
    551       padding: 4px;
    552       margin: 4px 0px;
    553     }
    554     table {
    555       border-collapse: collapse;
    556     }
    557   }
    558 }
    559 
    560 .track-group-panel {
    561   --collapsed-background: hsla(190, 49%, 97%, 1);
    562   --collapsed-transparent: hsla(190, 49%, 97%, 0);
    563   --expanded-background: hsl(215, 22%, 19%);
    564   display: grid;
    565   grid-template-columns: auto 1fr;
    566   grid-template-rows: 1fr;
    567   transition: background-color .4s, color .4s;
    568   height: 40px;
    569   &::after {
    570     display: block;
    571     content: '';
    572     grid-column: 1 / span 2;
    573     border-top: 1px solid var(--track-border-color);
    574     margin-top: -1px;
    575   }
    576   &[collapsed=true] {
    577     background-color: var(--collapsed-background-transparent);
    578     .shell {
    579       border-right: 1px solid #c7d0db;
    580       background-color: var(--collapsed-background);
    581     }
    582   }
    583   &[collapsed=false] {
    584     background-color: var(--expanded-background);
    585     color: white;
    586     font-weight: bold;
    587   }
    588   .shell {
    589     padding: 4px 10px;
    590     display: grid;
    591     grid-template-areas: "title fold-button";
    592     grid-template-columns: 1fr 24px;
    593     align-items: center;
    594     line-height: 1;
    595     width: var(--track-shell-width);
    596     transition: background-color .4s;
    597     h1 {
    598       grid-area: title;
    599       font-size: 14px;
    600       text-overflow: ellipsis;
    601       font-family: 'Google Sans';
    602       text-align: left;
    603       direction: rtl;
    604     }
    605     .fold-button {
    606       grid-area: fold-button;
    607       cursor: pointer;
    608       &:hover {
    609         color: hsl(45, 100%, 48%);
    610       }
    611     }
    612   }
    613 }
    614 
    615 .time-selection-panel {
    616   height: 10px;
    617 }
    618 
    619 .log-panel {
    620   width: 100%;
    621   height: 100%;
    622   display: grid;
    623   grid-template-rows: auto 1fr;
    624 
    625   header.stale {
    626     color: grey;
    627   }
    628 
    629   .scrolling-container {
    630     overflow-y: scroll;
    631     position: relative;
    632     width: 100%;
    633     background-color: #fefefe;
    634     border-bottom: 1px solid hsl(213, 22%, 75%);
    635 
    636     .rows {
    637       position: relative;
    638       direction: ltr;
    639       width: 100%;
    640 
    641       .row {
    642         @include transition();
    643         position: absolute;
    644         width: 100%;
    645         height: 20px;
    646         line-height: 20px;
    647         background-color: hsl(214, 22%, 100%);
    648 
    649         &.D { color: hsl(122, 20%, 40%); }
    650         &.V { color: hsl(122, 20%, 30%); }
    651         &.I { color: hsl(0, 0%, 20%); }
    652         &.W { color: hsl(45, 60%, 45%); }
    653         &.E { color: hsl(4, 90%, 58%); }
    654         &.F { color: hsl(291, 64%, 42%); }
    655         &.stale { color: #aaa; }
    656         &:nth-child(even) {
    657             background-color: hsl(214, 22%, 95%);
    658         }
    659         &:hover {
    660           background-color: hsl(214, 22%, 90%);
    661         }
    662         .cell {
    663           font-size: 11px;
    664           font-family: var(--monospace-font);
    665           white-space: nowrap;
    666           overflow: hidden;
    667           text-overflow: ellipsis;
    668           padding-left: 10px;
    669           padding-right: 10px;
    670           display: inline-block;
    671           &:first-child {
    672             padding-left: 5px;
    673           }
    674           &:last-child {
    675             padding-right: 5px;
    676           }
    677           &:nth-child(1) {
    678             width: 110px;
    679             text-overflow: clip;
    680             text-align: right;
    681           }
    682           &:nth-child(2) {
    683             width: 20px;
    684           }
    685           &:nth-child(3) {
    686             width: 15%;
    687           }
    688           &:nth-child(4) {
    689             width: calc(100% - 110px - 20px - 15%);
    690           }
    691           &:only-child {
    692             width: 100%;
    693           }
    694         }
    695       }
    696     }
    697   }
    698 }
    699