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. |
Primiano Tucci | f4a0c0a | 2019-10-29 10:39:52 +0100 | [diff] [blame] | 14 | |
Hector Dearman | 8002ca6 | 2023-03-06 16:58:43 +0000 | [diff] [blame] | 15 | @import "widgets/theme"; |
| 16 | |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 17 | .sidebar { |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 18 | --sidebar-padding-bottom: 40px; |
| 19 | --sidebar-timing: 0.15s; |
| 20 | grid-area: sidebar; |
| 21 | z-index: 4; |
| 22 | background-color: #262f3c; |
| 23 | overflow: hidden; |
| 24 | width: var(--sidebar-width); |
| 25 | display: flex; |
| 26 | position: relative; |
| 27 | flex-direction: column; |
Primiano Tucci | a9e4456 | 2024-06-28 18:19:45 +0000 | [diff] [blame] | 28 | transition: |
| 29 | margin-left var(--anim-easing) var(--sidebar-timing), |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 30 | visibility linear var(--sidebar-timing); |
| 31 | > * { |
| 32 | border-bottom: 1px solid #404854; |
| 33 | } |
| 34 | input[type="file"] { |
| 35 | display: none; |
| 36 | } |
| 37 | > header { |
| 38 | font-family: "Roboto Condensed", sans-serif; |
| 39 | font-weight: 700; |
| 40 | font-size: 24px; |
| 41 | height: var(--topbar-height); |
| 42 | line-height: var(--topbar-height); |
| 43 | vertical-align: middle; |
Hector Dearman | 8002ca6 | 2023-03-06 16:58:43 +0000 | [diff] [blame] | 44 | padding: 0 12px; |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 45 | color: #fff; |
| 46 | overflow: visible; |
| 47 | .brand { |
Hector Dearman | 8002ca6 | 2023-03-06 16:58:43 +0000 | [diff] [blame] | 48 | height: 36px; |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 49 | margin-top: 4px; |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 50 | } |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 51 | &::before { |
| 52 | z-index: 10; |
Primiano Tucci | d3a9983 | 2020-02-12 18:35:15 +0000 | [diff] [blame] | 53 | } |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 54 | &.canary::before, |
| 55 | &.autopush::before { |
| 56 | display: block; |
Primiano Tucci | f4a0c0a | 2019-10-29 10:39:52 +0100 | [diff] [blame] | 57 | position: absolute; |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 58 | font-size: 10px; |
Hector Dearman | 97510d5 | 2023-03-10 16:21:12 +0000 | [diff] [blame] | 59 | line-height: 5px; |
Hector Dearman | 8002ca6 | 2023-03-06 16:58:43 +0000 | [diff] [blame] | 60 | font-family: "Roboto", sans-serif; |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 61 | top: 7px; |
Hector Dearman | 97510d5 | 2023-03-10 16:21:12 +0000 | [diff] [blame] | 62 | right: 48px; |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 63 | } |
| 64 | &.canary::before { |
| 65 | content: "CANARY"; |
| 66 | color: #ffd700; |
| 67 | } |
| 68 | &.autopush::before { |
| 69 | content: "AUTOPUSH"; |
| 70 | color: #aed581; |
| 71 | } |
| 72 | } |
| 73 | .sidebar-button { |
| 74 | position: fixed; |
| 75 | z-index: 5; |
| 76 | background-color: #262f3c; |
| 77 | height: var(--topbar-height); |
| 78 | left: calc(var(--sidebar-width) - 50px); |
| 79 | border-radius: 0 5px 5px 0; |
| 80 | border-bottom: inherit; |
| 81 | visibility: visible; // So stays visible when the sidebar is hidden. |
| 82 | transition: left var(--anim-easing) var(--sidebar-timing); |
| 83 | width: 48px; |
| 84 | overflow: hidden; |
| 85 | > button { |
| 86 | vertical-align: middle; |
| 87 | } |
| 88 | } |
| 89 | &.hide-sidebar { |
| 90 | visibility: hidden; |
| 91 | margin-left: calc(var(--sidebar-width) * -1); |
| 92 | .sidebar-button { |
| 93 | left: 0; |
| 94 | background-color: transparent; |
| 95 | border-radius: unset; |
| 96 | border-bottom: none; |
| 97 | color: #aaaaaa; |
| 98 | } |
| 99 | } |
| 100 | .sidebar-scroll { |
| 101 | overflow-y: auto; |
| 102 | flex: 1; |
| 103 | &::-webkit-scrollbar { |
| 104 | width: 0.5em; |
| 105 | } |
| 106 | &::-webkit-scrollbar-track { |
| 107 | background-color: #19212b; |
| 108 | border-radius: 2px; |
| 109 | } |
| 110 | &::-webkit-scrollbar-thumb { |
| 111 | background: #b4b7ba6e; |
| 112 | border-radius: 2px; |
| 113 | } |
| 114 | > .sidebar-scroll-container { |
| 115 | position: relative; |
| 116 | min-height: 100%; |
| 117 | padding-bottom: var(--sidebar-padding-bottom); |
Primiano Tucci | f4a0c0a | 2019-10-29 10:39:52 +0100 | [diff] [blame] | 118 | |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 119 | > section { |
| 120 | @include transition(); |
| 121 | padding: 20px 0; |
| 122 | max-height: 80px; |
| 123 | .section-header { |
| 124 | cursor: pointer; |
| 125 | > h1, |
| 126 | > h2 { |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 127 | letter-spacing: 0.25px; |
| 128 | overflow: hidden; |
| 129 | text-overflow: ellipsis; |
| 130 | white-space: nowrap; |
Hector Dearman | 8002ca6 | 2023-03-06 16:58:43 +0000 | [diff] [blame] | 131 | margin: 0 12px; |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 132 | } |
| 133 | > h1 { |
| 134 | color: #fff; |
| 135 | font-size: 15px; |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 136 | } |
| 137 | > h2 { |
| 138 | @include transition(); |
| 139 | color: rgba(255, 255, 255, 0.5); |
| 140 | font-size: 12px; |
| 141 | margin-top: 8px; |
| 142 | font-weight: 400; |
| 143 | } |
| 144 | &:before { |
| 145 | @include material-icon("expand_more"); |
| 146 | float: right; |
| 147 | color: rgba(255, 255, 255, 0.3); |
| 148 | margin-right: 12px; |
| 149 | margin-top: -4px; |
| 150 | } |
Primiano Tucci | f4a0c0a | 2019-10-29 10:39:52 +0100 | [diff] [blame] | 151 | } |
Primiano Tucci | f4a0c0a | 2019-10-29 10:39:52 +0100 | [diff] [blame] | 152 | &:hover { |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 153 | background-color: #373f4b; |
| 154 | } |
| 155 | &.expanded { |
| 156 | background-color: #19212b; |
| 157 | max-height: unset; |
| 158 | .section-header { |
| 159 | h2 { |
| 160 | opacity: 0; |
| 161 | } |
| 162 | |
| 163 | &:before { |
| 164 | content: "expand_less"; |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | .section-content { |
| 169 | pointer-events: inherit; |
| 170 | opacity: 1; |
| 171 | } |
Primiano Tucci | f4a0c0a | 2019-10-29 10:39:52 +0100 | [diff] [blame] | 172 | } |
| 173 | } |
| 174 | |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 175 | .section-content { |
| 176 | pointer-events: none; |
| 177 | @include transition(); |
| 178 | opacity: 0; |
| 179 | color: #b4b7ba; |
Primiano Tucci | ec59013 | 2020-11-16 14:16:44 +0100 | [diff] [blame] | 180 | a { |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 181 | color: #b4b7ba; |
Primiano Tucci | ec59013 | 2020-11-16 14:16:44 +0100 | [diff] [blame] | 182 | } |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 183 | ul { |
| 184 | list-style-type: none; |
| 185 | margin: 0; |
| 186 | padding: 0; |
| 187 | } |
| 188 | li { |
| 189 | @include transition(); |
| 190 | a { |
| 191 | line-height: 24px; |
| 192 | font-size: 14px; |
Hector Dearman | 8002ca6 | 2023-03-06 16:58:43 +0000 | [diff] [blame] | 193 | padding: 4px 12px; |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 194 | text-decoration: none; |
| 195 | display: block; |
| 196 | &.pending { |
| 197 | color: rgba(255, 255, 255, 0.3); |
| 198 | &::after { |
| 199 | content: " "; |
| 200 | display: inline-block; |
| 201 | vertical-align: middle; |
| 202 | box-sizing: border-box; |
| 203 | width: 18px; |
| 204 | height: 18px; |
| 205 | margin-left: 10px; |
| 206 | border-radius: 50%; |
| 207 | border: 2px solid #b4b7ba; |
| 208 | border-color: #b4b7ba transparent; |
| 209 | animation: pending-spinner 1.25s linear infinite; |
| 210 | } |
| 211 | @keyframes pending-spinner { |
| 212 | 0% { |
| 213 | transform: rotate(0deg); |
| 214 | } |
| 215 | 100% { |
| 216 | transform: rotate(360deg); |
| 217 | } |
| 218 | } |
| 219 | } |
| 220 | &[disabled] { |
| 221 | text-decoration: line-through; |
| 222 | } |
| 223 | } |
| 224 | .material-icons { |
| 225 | margin-right: 10px; |
Steve Golton | df16d18 | 2023-03-17 10:50:24 +0000 | [diff] [blame] | 226 | font-size: 20px; |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 227 | } |
| 228 | &:hover { |
| 229 | background-color: #373f4b; |
| 230 | } |
| 231 | .trace-file-name { |
| 232 | white-space: break-spaces; |
| 233 | font-family: "Roboto Condensed", sans-serif; |
| 234 | word-break: break-all; |
| 235 | font-weight: 300; |
| 236 | letter-spacing: 0; |
| 237 | margin-top: -10px; |
| 238 | color: #fff; |
| 239 | } |
| 240 | } |
Primiano Tucci | ec59013 | 2020-11-16 14:16:44 +0100 | [diff] [blame] | 241 | } |
Primiano Tucci | 21b91bf | 2018-08-06 16:42:07 +0100 | [diff] [blame] | 242 | } |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 243 | } |
| 244 | |
| 245 | .sidebar-footer { |
| 246 | position: absolute; |
| 247 | bottom: 0; |
| 248 | width: 100%; |
| 249 | padding: 2px 10px; |
| 250 | display: grid; |
| 251 | height: -var(--sidebar-padding-bottom); |
| 252 | grid-template-columns: repeat(4, min-content); |
| 253 | grid-gap: 10px; |
| 254 | |
| 255 | > button { |
| 256 | color: hsl(217, 39%, 94%); |
| 257 | i { |
| 258 | font-size: 24px; |
| 259 | } |
| 260 | |
| 261 | &:hover { |
| 262 | color: hsl(45, 100%, 48%); |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | > .dbg-info-square { |
Hector Dearman | 8002ca6 | 2023-03-06 16:58:43 +0000 | [diff] [blame] | 267 | font-family: "Roboto Condensed", sans-serif; |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 268 | width: 24px; |
Hector Dearman | 8002ca6 | 2023-03-06 16:58:43 +0000 | [diff] [blame] | 269 | height: 24px; |
| 270 | line-height: 24px; |
| 271 | display: flex; |
| 272 | justify-content: center; |
| 273 | flex-direction: column; |
| 274 | align-items: center; |
| 275 | |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 276 | margin: 1px 0; |
| 277 | background: #12161b; |
| 278 | color: #4e71b3; |
Hector Dearman | 8002ca6 | 2023-03-06 16:58:43 +0000 | [diff] [blame] | 279 | border-radius: $pf-border-radius; |
Andrew Shulaev | 1095582 | 2022-11-28 15:53:59 +0000 | [diff] [blame] | 280 | font-size: 12px; |
| 281 | text-align: center; |
| 282 | &.green { |
| 283 | background: #7aca75; |
| 284 | color: #12161b; |
| 285 | } |
| 286 | &.amber { |
| 287 | background: #ffc107; |
| 288 | color: #333; |
| 289 | } |
| 290 | &.red { |
| 291 | background: #d32f2f; |
| 292 | color: #fff; |
| 293 | } |
| 294 | > div { |
| 295 | font-size: 10px; |
| 296 | line-height: 11px; |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | .version { |
| 301 | position: absolute; |
| 302 | right: 8px; |
| 303 | bottom: 3px; |
| 304 | font-size: 12px; |
| 305 | font-family: "Roboto Condensed", sans-serif; |
| 306 | a { |
| 307 | color: rgba(255, 255, 255, 0.5); |
| 308 | text-decoration: none; |
| 309 | } |
| 310 | margin-top: 11px; |
| 311 | } |
| 312 | } |
Hector Dearman | 250376b | 2018-08-07 11:15:52 +0100 | [diff] [blame] | 313 | } |
Isabelle Taylor | f41b7c7 | 2019-07-24 13:55:43 +0100 | [diff] [blame] | 314 | |
Primiano Tucci | 8bcf608 | 2021-06-11 17:15:22 +0100 | [diff] [blame] | 315 | // Hide the footer when running integration tests, as the version code and the |
| 316 | // tiny text with pending queries can fail the screenshot diff test. |
| 317 | body.testing .sidebar-footer { |
| 318 | visibility: hidden; |
| 319 | } |
| 320 | |
Hector Dearman | f1f99eb | 2019-09-03 16:36:35 +0100 | [diff] [blame] | 321 | .keycap { |
| 322 | background-color: #fafbfc; |
| 323 | border: 1px solid #d1d5da; |
| 324 | border-bottom-color: #c6cbd1; |
| 325 | border-radius: 3px; |
| 326 | box-shadow: inset 0 -1px 0 #c6cbd1; |
| 327 | color: #444d56; |
| 328 | display: inline-block; |
| 329 | font-family: var(--monospace-font); |
| 330 | vertical-align: middle; |
| 331 | |
| 332 | line-height: 20px; |
| 333 | padding: 3px 7px; |
| 334 | } |