Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 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; |
Primiano Tucci | 8afc06d | 2018-08-06 19:11:42 +0100 | [diff] [blame] | 17 | --monospace-font: 'Roboto Mono', monospace; |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | @mixin transition($time:0.1s) { |
Primiano Tucci | 62f5bef | 2018-08-06 22:57:19 +0100 | [diff] [blame] | 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; |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 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 | |
| 55 | html { |
| 56 | font-family: Roboto, verdana, sans-serif; |
| 57 | height: 100%; |
| 58 | width: 100%; |
| 59 | } |
| 60 | |
| 61 | html, |
| 62 | body { |
| 63 | height: 100%; |
| 64 | width: 100%; |
| 65 | padding: 0; |
| 66 | margin: 0; |
| 67 | user-select: none; |
| 68 | } |
| 69 | |
| 70 | h1, |
| 71 | h2, |
| 72 | h3 { |
| 73 | font-family: initial; |
| 74 | font-size: initial; |
| 75 | font-weight: initial; |
| 76 | padding: 0; |
| 77 | margin: 0; |
| 78 | } |
| 79 | |
| 80 | table { |
| 81 | user-select: text; |
| 82 | } |
| 83 | |
| 84 | body { |
| 85 | display: grid; |
Hector Dearman | 03f962c | 2018-08-09 17:00:32 +0100 | [diff] [blame] | 86 | grid-template-areas: |
| 87 | "sidebar topbar" |
| 88 | "sidebar page" |
| 89 | "sidebar alerts"; |
| 90 | grid-template-rows: var(--topbar-height) 1fr auto; |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 91 | grid-template-columns: var(--sidebar-width) auto; |
| 92 | color: #121212; |
| 93 | } |
| 94 | |
Hector Dearman | 03f962c | 2018-08-09 17:00:32 +0100 | [diff] [blame] | 95 | button { |
| 96 | background: none; |
| 97 | color: inherit; |
| 98 | border: none; |
| 99 | padding: 0; |
| 100 | font: inherit; |
| 101 | cursor: pointer; |
| 102 | outline: inherit; |
| 103 | } |
| 104 | |
| 105 | button.close { |
| 106 | font-family: var(--monospace-font); |
| 107 | } |
| 108 | |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 109 | .full-page-loading-screen { |
| 110 | position: absolute; |
| 111 | background: #3e4a5a; |
| 112 | width: 100%; |
| 113 | height: 100%; |
| 114 | display: flex; |
| 115 | justify-content: center; |
| 116 | align-items: center; |
| 117 | flex-direction: row; |
| 118 | background-image: url('assets/logo.png'); |
| 119 | background-attachment: fixed; |
| 120 | background-repeat: no-repeat; |
| 121 | background-position: center; |
| 122 | } |
| 123 | |
| 124 | .page { |
| 125 | grid-area: page; |
| 126 | position: relative; |
| 127 | } |
| 128 | |
Hector Dearman | 03f962c | 2018-08-09 17:00:32 +0100 | [diff] [blame] | 129 | .alerts { |
| 130 | grid-area: alerts; |
| 131 | background-color: #262f3c; |
| 132 | div { |
| 133 | font-family: 'Raleway'; |
| 134 | font-weight: 400; |
| 135 | letter-spacing: 0.25px; |
| 136 | color: white; |
| 137 | padding: 25px; |
| 138 | a { |
| 139 | color: white; |
| 140 | } |
| 141 | } |
| 142 | } |
| 143 | |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 144 | @import 'sidebar'; |
| 145 | @import 'topbar'; |
| 146 | .home-page { |
| 147 | text-align: center; |
| 148 | padding-top: 20vh; |
| 149 | } |
| 150 | |
| 151 | .home-page .logo { |
| 152 | width: 250px; |
| 153 | } |
| 154 | |
| 155 | .home-page-title { |
| 156 | font-size: 60px; |
| 157 | margin: 25px; |
| 158 | text-align: center; |
| 159 | font-family: 'Raleway', sans-serif; |
| 160 | font-weight: 100; |
| 161 | color: #333; |
| 162 | } |
| 163 | |
| 164 | .query-table { |
| 165 | width: 100%; |
| 166 | border-collapse: collapse; |
| 167 | font-size: 14px; |
| 168 | border: 0; |
| 169 | thead td { |
| 170 | background-color: hsl(214, 22%, 90%); |
| 171 | color: #262f3b; |
| 172 | text-align: center; |
| 173 | padding: 1px 3px; |
| 174 | border-style: solid; |
| 175 | border-color: #fff; |
| 176 | border-right-width: 1px; |
| 177 | border-left-width: 1px; |
| 178 | } |
| 179 | tbody tr { |
| 180 | @include transition(); |
| 181 | background-color: hsl(214, 22%, 100%); |
Primiano Tucci | 8afc06d | 2018-08-06 19:11:42 +0100 | [diff] [blame] | 182 | font-family: var(--monospace-font); |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 183 | &:nth-child(even) { |
| 184 | background-color: hsl(214, 22%, 95%); |
| 185 | } |
| 186 | td:first-child { |
| 187 | padding-left: 5px; |
| 188 | } |
| 189 | td:last-child { |
| 190 | padding-right: 5px; |
| 191 | } |
| 192 | &:hover { |
| 193 | background-color: hsl(214, 22%, 90%); |
| 194 | } |
| 195 | } |
| 196 | } |
| 197 | |
Primiano Tucci | 8afc06d | 2018-08-06 19:11:42 +0100 | [diff] [blame] | 198 | .query-error { |
| 199 | padding: 20px 10px; |
| 200 | color: hsl(-10, 50%, 50%); |
| 201 | font-family: 'Google Sans'; |
| 202 | } |
| 203 | |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 204 | .page header { |
| 205 | height: 25px; |
| 206 | line-height: 25px; |
| 207 | background-color: hsl(213, 22%, 82%); |
| 208 | color: hsl(213, 22%, 20%); |
| 209 | font-family: 'Google sans'; |
| 210 | font-size: 15px; |
| 211 | font-weight: 400; |
| 212 | padding: 0 10px; |
| 213 | vertical-align: middle; |
| 214 | border-color: hsl(213, 22%, 75%); |
| 215 | border-style: solid; |
| 216 | border-top-width: 1px; |
| 217 | border-bottom-width: 1px; |
| 218 | .code { |
Primiano Tucci | 8afc06d | 2018-08-06 19:11:42 +0100 | [diff] [blame] | 219 | font-family: var(--monospace-font); |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 220 | font-size: 12px; |
| 221 | margin-left: 10px; |
| 222 | color: hsl(213, 22%, 40%); |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | .track { |
Hector Dearman | 3ae7eb7 | 2018-08-14 17:51:14 +0100 | [diff] [blame] | 227 | display: grid; |
| 228 | grid-template-columns: auto 1fr; |
| 229 | grid-template-rows: 1fr; |
| 230 | border-top: 1px solid #c7d0db; |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 231 | .track-shell { |
Hector Dearman | 3ae7eb7 | 2018-08-14 17:51:14 +0100 | [diff] [blame] | 232 | padding: 0 20px; |
| 233 | display: grid; |
Hector Dearman | edbe097 | 2018-08-31 13:02:58 +0100 | [diff] [blame] | 234 | grid-template-areas: "title up down"; |
| 235 | grid-template-columns: 1fr auto auto; |
Hector Dearman | 3ae7eb7 | 2018-08-14 17:51:14 +0100 | [diff] [blame] | 236 | align-items: center; |
| 237 | width: 300px; |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 238 | background: #fff; |
Deepanjan Roy | 9d95a25 | 2018-08-09 10:10:19 -0400 | [diff] [blame] | 239 | border-right: 1px solid #c7d0db; |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 240 | h1 { |
Hector Dearman | 3ae7eb7 | 2018-08-14 17:51:14 +0100 | [diff] [blame] | 241 | grid-area: title; |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 242 | margin: 0; |
Primiano Tucci | dc3dbcb | 2018-08-10 00:34:33 +0100 | [diff] [blame] | 243 | font-size: 1em; |
| 244 | text-overflow: ellipsis; |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 245 | font-family: 'Google Sans'; |
Primiano Tucci | dc3dbcb | 2018-08-10 00:34:33 +0100 | [diff] [blame] | 246 | color: hsl(213, 22%, 30%); |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 247 | } |
Deepanjan Roy | 9d95a25 | 2018-08-09 10:10:19 -0400 | [diff] [blame] | 248 | .track-move-icons { |
Hector Dearman | 3ae7eb7 | 2018-08-14 17:51:14 +0100 | [diff] [blame] | 249 | justify-self: end; |
Hector Dearman | edbe097 | 2018-08-31 13:02:58 +0100 | [diff] [blame] | 250 | margin: 0 5px; |
Deepanjan Roy | 9d95a25 | 2018-08-09 10:10:19 -0400 | [diff] [blame] | 251 | color: #fff; |
| 252 | font-weight: bold; |
| 253 | text-align: center; |
| 254 | cursor: pointer; |
| 255 | background: #ced0e7; |
| 256 | border-radius: 12px; |
| 257 | display: block; |
| 258 | width: 24px; |
| 259 | height: 24px; |
| 260 | border: none; |
| 261 | outline: none; |
| 262 | } |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 263 | } |
| 264 | } |
| 265 | |
Deepanjan Roy | 9d95a25 | 2018-08-09 10:10:19 -0400 | [diff] [blame] | 266 | .scrolling-panel-container { |
Deepanjan Roy | abd79aa | 2018-08-28 07:29:15 -0400 | [diff] [blame] | 267 | position: relative; |
| 268 | overflow-x: hidden; |
| 269 | overflow-y: auto; |
| 270 | flex: 1 1 auto; |
| 271 | will-change: transform; // Force layer creation. |
| 272 | } |
| 273 | |
| 274 | .pinned-panel-container { |
| 275 | position: relative; |
| 276 | // Override top level overflow: hidden so height of this flex item can be |
| 277 | // its content height. |
| 278 | overflow: visible; |
| 279 | } |
| 280 | |
Deepanjan Roy | 1f658fe | 2018-09-11 08:38:17 -0400 | [diff] [blame] | 281 | // In the scrolling case, since the canvas is overdrawn and continuously |
| 282 | // repositioned, we need the canvas to be in a div with overflow hidden and |
| 283 | // height equaling the total height of the content to prevent scrolling |
| 284 | // height from growing. |
Deepanjan Roy | abd79aa | 2018-08-28 07:29:15 -0400 | [diff] [blame] | 285 | .scroll-limiter { |
| 286 | overflow: hidden; |
| 287 | position: relative; |
Deepanjan Roy | abd79aa | 2018-08-28 07:29:15 -0400 | [diff] [blame] | 288 | } |
| 289 | |
| 290 | canvas.main-canvas { |
| 291 | top: 0px; |
Deepanjan Roy | abd79aa | 2018-08-28 07:29:15 -0400 | [diff] [blame] | 292 | position: absolute; |
| 293 | } |
| 294 | |
Deepanjan Roy | abd79aa | 2018-08-28 07:29:15 -0400 | [diff] [blame] | 295 | .panel { |
Deepanjan Roy | 1f658fe | 2018-09-11 08:38:17 -0400 | [diff] [blame] | 296 | position: relative; // Otherwise canvas covers panel dom. |
Deepanjan Roy | abd79aa | 2018-08-28 07:29:15 -0400 | [diff] [blame] | 297 | } |
| 298 | |
| 299 | .pan-and-zoom-content { |
| 300 | height: 100%; |
| 301 | position: relative; |
| 302 | display: flex; |
| 303 | flex-flow: column nowrap; |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 304 | } |
Deepanjan Roy | 1f658fe | 2018-09-11 08:38:17 -0400 | [diff] [blame] | 305 | |
| 306 | .overview-timeline { |
| 307 | height: 100px; |
| 308 | } |
| 309 | |
| 310 | .time-axis-panel { |
| 311 | height: 30px; |
| 312 | } |
| 313 | |
| 314 | .flame-graph-panel { |
| 315 | height: 500px; |
| 316 | } |
| 317 | |
| 318 | header { |
| 319 | height: 25px; |
| 320 | } |