1/* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17/* Dark theme, the default if none specified */ 18body, body.dark-theme { 19 --main-bg: black; 20 --main-fg: white; 21 --error-bg: #900000; /* dark red */ 22 --alert-bg: #927836; /* dark yellow */ 23 --info-bg: #007000; /* dark green */ 24 --modal-bg: #5f6368ea; /* Semi-transparent Google grey 500 */ 25 --modal-button-bg: #e8eaed; /* Google grey 200 */ 26 --modal-button-shadow: #444444; 27 --modal-button-fg: black; 28 --modal-button-border: black; 29 --modal-button-invalid-border: red; 30 --modal-button-highlight-bg: #f4cccc; /* light red */ 31 --modal-padding: 20px; 32 --bt-label-fg: green; 33 --bt-label-invalid-fg: red; 34 --bt-action-bg: transparent; 35 --custom-button-bg: #1c4587ff; /* blue */ 36 --button-fg: #e8eaed; /* Google grey 200 */ 37 --button-bg: transparent; 38 --button-disabled-fg: #9aa0a6; /* Google grey 500 */ 39 --button-pressed-border: #505050; 40 --button-pressed-bg: #303030; 41 --display-border: solid #202020 1px; 42} 43/* End of dark theme */ 44 45/* Light theme */ 46body.light-theme { 47 --main-bg: #fafafa; 48 --main-fg: black; 49 --error-bg: #ea9da0; /* light red */ 50 --alert-bg: #f3ef9e; /* light yellow */ 51 --info-bg: #a5d5a5; /* light green */ 52 --modal-bg: #d9d9d9ea; /* Semi-transparent Google grey 200 */ 53 --modal-button-bg: #7b7b7b; /* Google grey 500 */ 54 --modal-button-shadow: #666666; 55 --modal-button-fg: #fafafa; 56 --modal-button-border: #c4c4c4; /* Google grey 300 */ 57 --modal-button-invalid-border: #c3413d; /*light red */ 58 --modal-button-highlight-bg: #a05555; /* dark red-ish */ 59 --bt-label-fg: green; 60 --bt-label-invalid-fg: #c3413d; /* light red */ 61 --bt-action-bg: transparent; 62 --custom-button-bg: #8fc3ea; /* light blue */ 63 --button-fg: #555555; /* Google grey 600 */ 64 --button-bg: transparent; 65 --button-disabled-fg: #c4c4c4; /* Google grey 300 */ 66 --button-pressed-border: #c4c4c4; /* Google grey 300 */ 67 --button-pressed-bg: #d9d9d9; /* Google grey 200 */ 68 --display-border: solid #f0f0f0 1px; 69} 70/* End of light theme */ 71 72body { 73 background-color: var(--main-bg); 74 margin: 0; 75 touch-action: none; 76 overscroll-behavior: none; 77} 78 79#device-connection { 80 display: none; 81 max-height: 100vh; 82} 83 84@keyframes spin { 85 0% { transform: rotate(0deg); } 86 100% { transform: rotate(360deg); } 87} 88 89#loader { 90 border-left: 12px solid #4285F4; 91 border-top: 12px solid #34A853; 92 border-right: 12px solid #FBBC05; 93 border-bottom: 12px solid #EA4335; 94 border-radius: 50%; 95 width: 70px; 96 height: 70px; 97 animation: spin 1.2s linear infinite; 98 margin: 100px; 99} 100 101/* Top header row. */ 102 103#header { 104 height: 64px; 105 /* Items inside this use a row Flexbox.*/ 106 display: flex; 107 align-items: center; 108} 109 110#record_video_btn { 111 display: none !important; 112} 113 114#error-message-div { 115 position: absolute; 116 top: 0; 117 left: 0; 118 width: 100%; 119 z-index: 999; 120 opacity: 0.97; 121} 122#error-message { 123 color: var(--main-fg); 124 font-family: 'Open Sans', sans-serif; 125 padding: 10px; 126 margin: 10px; 127 border-radius: 10px; 128} 129#error-message .close-btn { 130 float: right; 131 cursor: pointer; 132} 133#error-message.hidden { 134 display: none; 135} 136#error-message.info { 137 background-color: var(--info-bg); 138} 139#error-message.warning { 140 background-color: var(--alert-bg); 141} 142#error-message.error { 143 background-color: var(--error-bg); 144} 145/* Control panel buttons and device screen(s). */ 146 147#controls-and-displays { 148 height: 100%; 149 150 /* Items inside this use a row Flexbox.*/ 151 display: flex; 152} 153 154#controls-and-displays > div { 155 margin-left: 5px; 156 margin-right: 5px; 157} 158 159.modal { 160 /* Start out hidden, and use absolute positioning. */ 161 display: none; 162 position: absolute; 163 164 border-radius: 10px; 165 padding: var(--modal-padding); 166 padding-top: 1px; 167 168 background-color: var(--modal-bg); 169 color: var(--main-fg); 170 font-family: 'Open Sans', sans-serif; 171} 172.modal-header { 173 cursor: move; 174 /* Items inside this use a row Flexbox.*/ 175 display: flex; 176 justify-content: space-between; 177} 178.modal-close { 179 color: var(--main-fg); 180 border: none; 181 outline: none; 182 background-color: transparent; 183} 184.modal-button, .modal-button-highlight { 185 background: var(--modal-button-bg); 186 border-radius: 10px; 187 box-shadow: 1px 1px var(--modal-button-shadow); 188 padding: 10px 20px; 189 color: var(--modal-button-fg); 190 display: inline-block; 191 font: normal bold 14px/1 "Open Sans", sans-serif; 192 text-align: center; 193} 194#bluetooth-wizard-mac:valid { 195 border: 2px solid var(--modal-button-border); 196} 197#bluetooth-wizard-mac:invalid { 198 border: 2px solid var(--modal-button-invalid-border); 199} 200#bluetooth-wizard-mac:invalid + span::before { 201 font-weight: bold; 202 content: 'X'; 203 color: var(--bt-label-invalid-fg); 204} 205#bluetooth-wizard-mac:valid + span::before { 206 font-weight: bold; 207 content: 'OK'; 208 color: var(--bt-label-fg); 209} 210.modal-button { 211 background: var(--modal-button-bg); 212} 213.modal-button-highlight { 214 background: var(--modal-button-highlight-bg); 215} 216#device-details-modal span { 217 white-space: pre; 218} 219#bluetooth-console-input { 220 width: 100%; 221} 222#bluetooth-console-cmd-label { 223 color: var(--main-fg); 224} 225.bluetooth-text, .bluetooth-text-bold, .bluetooth-text-field input { 226 font: normal 18px/1 "Open Sans", sans-serif; 227} 228.bluetooth-text, .bluetooth-text-bold { 229 color: var(--main-fg); 230} 231.bluetooth-text-bold { 232 font: bold; 233} 234.bluetooth-button { 235 text-align: center; 236} 237.bluetooth-drop-down select { 238 font: normal 18px/1 "Open Sans", sans-serif; 239 color: var(--modal-button-fg); 240 width: 500px; 241 margin: 5px; 242 rows: 10; 243 columns: 60; 244} 245.bluetooth-text-field input { 246 color: var(--modal-button-fg); 247 width: 500px; 248 margin: 5px; 249 rows: 10; 250 columns: 60; 251} 252.bluetooth-list-trash { 253 background: var(--bt-action-bg); 254 border: 0px; 255 color: var(--main-fg); 256} 257 258.location-text, .location-text-bold, .location-text-field input { 259 font: normal 18px/1 "Open Sans", sans-serif; 260} 261.location-text, .location-text-bold { 262 color: var(--main-fg); 263} 264.location-text-bold { 265 font: bold; 266} 267.location-button { 268 text-align: center; 269} 270.sensors{ 271 position: sticky; 272 right: 0; 273 top: 0; 274 text-align: right; 275} 276.fixed-orientation{ 277 position: sticky; 278 right: 0; 279 top: 0; 280 text-align: right; 281} 282.control-panel-column { 283 width: 50px; 284 /* Items inside this use a column Flexbox.*/ 285 display: flex; 286 flex-direction: column; 287 padding: 1px; 288} 289#control-panel-custom-buttons { 290 display: none; 291 /* Give the custom buttons column a blue background. */ 292 background-color: var(--custom-button-bg); 293 height: fit-content; 294 border-radius: 10px; 295 top: 10px; 296 position: sticky; 297} 298 299.control-panel-column button { 300 margin: 0px 1px 5px 1px; 301 height: 50px; 302 font-size: 32px; 303 304 color: var(--button-fg); 305 border: none; 306 border-radius: 10px; 307 outline: none; 308 background-color: var(--button-bg); 309} 310 311.control-panel-column button.modal-button-opened { 312 background-color: var(--modal-bg); 313} 314 315.control-panel-column button:disabled { 316 color: var(--button-disabled-fg); 317 cursor: not-allowed; 318} 319 320.control-panel-column button:enabled { 321 cursor: pointer; 322} 323 324.control-panel-column button:active { 325 margin: 0px 0px 5px 0px; 326 border: solid 1px var(--button-pressed-border); 327 background-color: var(--button-pressed-bg); 328} 329 330#device-displays { 331 /* Take up the remaining width of the window.*/ 332 flex-grow: 1; 333 /* Don't grow taller than the window.*/ 334 max-height: 100vh; 335 /* Allows child elements to be positioned relative to this element. */ 336 position: relative; 337 display: flex; 338 flex-direction: row; 339 /* Don't show an outline when using the keyboard */ 340 outline: 0px solid transparent; 341} 342 343/* 344 * Container <div> used to wrap each display's <video> element which is used for 345 * maintaining each display's width and height while the display is potentially 346 * rotating. 347 */ 348.device-display { 349 position: relative; 350 display: flex; 351 flex-direction: column; 352 flex-grow: 1; 353 margin: 10px; 354 visibility: hidden; 355} 356 357.device-video-container { 358 flex-grow: 1; 359 overflow: hidden; 360} 361 362/* Container <div> to show info about the individual display. */ 363.device-display-info { 364 color: var(--main-fg); 365 /* dark green */ 366 background-color: var(--info-bg); 367 font-family: 'Open Sans', sans-serif; 368 text-indent: 0px; 369 border-radius: 10px; 370 padding: 10px; 371 margin-bottom: 10px; 372 flex-grow: 0; 373 flex-shrink: 0; 374} 375 376/* The actual <video> element for each display. */ 377.device-display-video { 378 position: relative; 379 max-width: 100%; 380 max-height: 100%; 381 touch-action: none; 382 border: var(--display-border); 383} 384 385#touchpad-modal { 386 /* Disable select to avoid weird behavior when dragging mouse while 387 interacting with touchpads */ 388 -webkit-user-select: none; 389 -ms-user-select: none; 390 user-select: none; 391 width: 200px; 392} 393 394#touchpad-modal-header { 395 justify-content: right; 396 margin-right: calc(-1 * var(--modal-padding)); 397} 398 399#touchpad-modal-button { 400 display: none; 401} 402 403#touchpad-controls { 404 position: relative; 405 display: flex; 406 flex-direction: column; 407 outline: 0px solid transparent; 408} 409 410.touchpad { 411 background-color: var(--button-fg); 412 touch-action: none; 413 position: relative; 414 flex-direction: column; 415 display: none; 416} 417 418.touchpad.selected { 419 display: block; 420} 421 422.touchpad:active { 423 background-color: var(--button-pressed-bg); 424} 425 426#touchpad-list .selectors { 427 margin-bottom: 10px; 428} 429 430#touchpad-list .selectors button { 431 color: var(--main-fg); 432 background: transparent; 433 border: none; 434 outline: none; 435 cursor: pointer; 436} 437 438#touchpad-list .selectors button:hover { 439 color: var(--main-bg); 440 background-color: var(--main-fg); 441} 442 443#touchpad-list .selectors button.selected { 444 color: var(--main-bg); 445 background-color: var(--button-fg); 446} 447