highlighters.css (25566B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 :host { 6 display: contents; 7 } 8 9 .highlighter-container { 10 --highlighter-accessibility-bounds-color: #6a5acd; 11 --highlighter-accessibility-bounds-opacity: 0.6; 12 --highlighter-box-border-color: #444444; 13 --highlighter-box-content-color: hsl(197, 71%, 73%); 14 --highlighter-box-margin-color: #edff64; 15 --highlighter-box-padding-color: #6a5acd; 16 --highlighter-bubble-text-color: hsl(216, 33%, 97%); 17 --highlighter-bubble-background-color: hsl(214, 13%, 24%); 18 --highlighter-bubble-border-color: rgba(255, 255, 255, 0.2); 19 --highlighter-bubble-arrow-size: 8px; 20 --highlighter-font-family: message-box; 21 --highlighter-font-size: 11px; 22 --highlighter-guide-color: hsl(200, 100%, 40%); 23 --highlighter-infobar-color: hsl(210, 30%, 85%); 24 --highlighter-rulers-opacity: 0.8; 25 --highlighter-viewport-size-background-color: rgba(255, 255, 255, var(--highlighter-rulers-opacity)); 26 27 --grey-40: #b1b1b3; 28 --grey-80: #2a2a2e; 29 --red-40: #ff3b6b; 30 --yellow-60: #d7b600; 31 --blue-60: #0060df; 32 } 33 34 /** 35 * Highlighters are absolute positioned in the page by default. 36 * A single highlighter can have fixed position in its css class if needed (see below the 37 * eye dropper or rulers highlighter, for example); but if it has to handle the 38 * document's scrolling (as rulers does), it would lag a bit behind due the APZ (Async 39 * Pan/Zoom module), that performs asynchronously panning and zooming on the compositor 40 * thread rather than the main thread. 41 */ 42 .highlighter-container { 43 position: absolute; 44 width: 100%; 45 height: 100%; 46 /* The container for all highlighters doesn't react to pointer-events by 47 default. This is because most highlighters cover the whole viewport but 48 don't contain UIs that need to be accessed. 49 If your highlighter has UI that needs to be interacted with, add 50 'pointer-events:auto;' on its container element. */ 51 pointer-events: none; 52 53 /* Don't allow forced colors for now. We might revisit this once we have High Contrast Mode 54 support in the DevTools toolbox */ 55 forced-color-adjust: none; 56 } 57 58 .highlighter-container.box-model { 59 /* Make the box-model container have a z-index other than auto so it always sits above 60 other highlighters. */ 61 z-index: 1; 62 } 63 64 .highlighter-container [hidden] { 65 display: none !important; 66 } 67 68 .highlighter-container [dragging] { 69 cursor: grabbing; 70 } 71 72 /* Box Model Highlighter */ 73 74 .box-model-regions { 75 opacity: 0.6; 76 } 77 78 /* Box model regions can be faded (see the onlyRegionArea option in 79 highlighters.js) in order to only display certain regions. */ 80 .box-model-regions [faded] { 81 display: none; 82 } 83 84 .box-model-content { 85 fill: var(--highlighter-box-content-color); 86 } 87 88 .box-model-padding { 89 fill: var(--highlighter-box-padding-color); 90 } 91 92 .box-model-border { 93 fill: var(--highlighter-box-border-color); 94 } 95 96 .box-model-margin { 97 fill: var(--highlighter-box-margin-color); 98 } 99 100 .box-model-content, 101 .box-model-padding, 102 .box-model-border, 103 .box-model-margin { 104 stroke: none; 105 } 106 107 .box-model-guide-top, 108 .box-model-guide-right, 109 .box-model-guide-bottom, 110 .box-model-guide-left { 111 stroke: var(--highlighter-guide-color); 112 stroke-dasharray: 5 3; 113 shape-rendering: crispEdges; 114 } 115 116 @media (prefers-reduced-motion) { 117 .use-simple-highlighters :is(.box-model-content, .box-model-padding, .box-model-border, .box-model-margin) { 118 fill: none; 119 stroke-width: 3; 120 } 121 122 .use-simple-highlighters .box-model-content { 123 stroke: var(--highlighter-box-content-color); 124 } 125 126 .use-simple-highlighters .box-model-padding { 127 stroke: var(--highlighter-box-padding-color); 128 } 129 130 .use-simple-highlighters .box-model-border { 131 stroke: var(--highlighter-box-border-color); 132 } 133 134 .use-simple-highlighters .box-model-margin { 135 stroke: var(--highlighter-box-margin-color); 136 } 137 } 138 139 /* Highlighter - Infobar */ 140 141 [class$="infobar-container"] { 142 position: absolute; 143 max-width: 95%; 144 145 font: var(--highlighter-font-family); 146 font-size: var(--highlighter-font-size); 147 } 148 149 [class$="infobar"] { 150 position: relative; 151 152 padding: 5px; 153 min-width: 75px; 154 155 border-radius: 3px; 156 background: var(--highlighter-bubble-background-color) no-repeat padding-box; 157 158 color: var(--highlighter-bubble-text-color); 159 text-shadow: none; 160 161 border: 1px solid var(--highlighter-bubble-border-color); 162 } 163 164 /* Arrows */ 165 166 [class$="infobar-container"] > [class$="infobar"]:before { 167 left: calc(50% - var(--highlighter-bubble-arrow-size)); 168 border: var(--highlighter-bubble-arrow-size) solid var(--highlighter-bubble-border-color); 169 } 170 171 [class$="infobar-container"] > [class$="infobar"]:after { 172 left: calc(50% - 7px); 173 border: 7px solid var(--highlighter-bubble-background-color); 174 } 175 176 [class$="infobar-container"] > [class$="infobar"]:before, 177 [class$="infobar-container"] > [class$="infobar"]:after { 178 content: ""; 179 display: none; 180 position: absolute; 181 height: 0; 182 width: 0; 183 border-left-color: transparent; 184 border-right-color: transparent; 185 } 186 187 [class$="infobar-container"][position="top"]:not([hide-arrow]) > [class$="infobar"]:before, 188 [class$="infobar-container"][position="top"]:not([hide-arrow]) > [class$="infobar"]:after { 189 border-bottom: 0; 190 top: 100%; 191 display: block; 192 } 193 194 [class$="infobar-container"][position="bottom"]:not([hide-arrow]) > [class$="infobar"]:before, 195 [class$="infobar-container"][position="bottom"]:not([hide-arrow]) > [class$="infobar"]:after { 196 border-top: 0; 197 bottom: 100%; 198 display: block; 199 } 200 201 /* Text Container */ 202 203 [class$="infobar-text"] { 204 overflow: hidden; 205 white-space: nowrap; 206 direction: ltr; 207 padding-bottom: 1px; 208 display: flex; 209 justify-content: center; 210 max-width: 768px; 211 } 212 213 .box-model-infobar-tagname { 214 color: hsl(285, 100%, 75%); 215 } 216 217 .box-model-infobar-id { 218 color: hsl(103, 46%, 54%); 219 overflow: hidden; 220 text-overflow: ellipsis; 221 } 222 223 .box-model-infobar-classes, 224 .box-model-infobar-pseudo-classes { 225 color: hsl(200, 74%, 57%); 226 overflow: hidden; 227 text-overflow: ellipsis; 228 } 229 230 [class$="infobar-dimensions"], 231 [class$="infobar-grid-type"], 232 [class$="infobar-flex-type"] { 233 border-inline-start: 1px solid #5a6169; 234 margin-inline-start: 6px; 235 padding-inline-start: 6px; 236 } 237 238 [class$="infobar-grid-type"]:empty, 239 [class$="infobar-flex-type"]:empty { 240 display: none; 241 } 242 243 [class$="infobar-dimensions"] { 244 color: var(--highlighter-infobar-color); 245 } 246 247 [class$="infobar-grid-type"], 248 [class$="infobar-flex-type"] { 249 color: var(--grey-40); 250 } 251 252 /* CSS Flexbox Highlighter */ 253 254 .flexbox-root { 255 position: absolute; 256 overflow: hidden; 257 } 258 259 /* CSS Grid Highlighter */ 260 261 .css-grid-root { 262 position: absolute; 263 overflow: hidden; 264 } 265 266 .css-grid-canvas { 267 position: absolute; 268 pointer-events: none; 269 top: 0; 270 left: 0; 271 image-rendering: -moz-crisp-edges; 272 } 273 274 .css-grid-regions { 275 opacity: 0.6; 276 } 277 278 .css-grid-areas, 279 .css-grid-cells { 280 opacity: 0.5; 281 stroke: none; 282 /* Set in css-grid.js */ 283 fill: var(--grid-color); 284 } 285 286 .css-grid-area-infobar-name, 287 .css-grid-cell-infobar-position, 288 .css-grid-line-infobar-number { 289 color: hsl(285, 100%, 75%); 290 } 291 292 .css-grid-line-infobar-names:not(:empty) { 293 color: var(--highlighter-infobar-color); 294 border-inline-start: 1px solid #5a6169; 295 margin-inline-start: 6px; 296 padding-inline-start: 6px; 297 } 298 299 /* CSS Transform Highlighter */ 300 301 .css-transform-transformed { 302 fill: var(--highlighter-box-content-color); 303 opacity: 0.8; 304 } 305 306 .css-transform-untransformed { 307 fill: #66cc52; 308 opacity: 0.8; 309 } 310 311 .css-transform-transformed, 312 .css-transform-untransformed, 313 .css-transform-line { 314 stroke: var(--highlighter-guide-color); 315 stroke-dasharray: 5 3; 316 stroke-width: 2; 317 } 318 319 /* Element Geometry Highlighter */ 320 321 .geometry-editor-root { 322 /* The geometry editor can be interacted with, so it needs to react to 323 pointer events */ 324 pointer-events: auto; 325 user-select: none; 326 } 327 328 .geometry-editor-offset-parent { 329 stroke: var(--highlighter-guide-color); 330 shape-rendering: crispEdges; 331 stroke-dasharray: 5 3; 332 fill: transparent; 333 } 334 335 .geometry-editor-current-node { 336 stroke: var(--highlighter-guide-color); 337 fill: var(--highlighter-box-content-color); 338 shape-rendering: crispEdges; 339 opacity: 0.6; 340 } 341 342 .geometry-editor-arrow { 343 stroke: var(--highlighter-guide-color); 344 shape-rendering: crispEdges; 345 } 346 347 .geometry-editor-root circle { 348 stroke: var(--highlighter-guide-color); 349 fill: var(--highlighter-box-content-color); 350 } 351 352 .geometry-editor-handler-top, 353 .geometry-editor-handler-bottom { 354 cursor: ns-resize; 355 } 356 357 .geometry-editor-handler-right, 358 .geometry-editor-handler-left { 359 cursor: ew-resize; 360 } 361 362 [dragging] .geometry-editor-handler-top, 363 [dragging] .geometry-editor-handler-right, 364 [dragging] .geometry-editor-handler-bottom, 365 [dragging] .geometry-editor-handler-left { 366 cursor: grabbing; 367 } 368 369 .geometry-editor-handler-top.dragging, 370 .geometry-editor-handler-right.dragging, 371 .geometry-editor-handler-bottom.dragging, 372 .geometry-editor-handler-left.dragging { 373 fill: var(--highlighter-guide-color); 374 } 375 376 .geometry-editor-label-bubble { 377 fill: var(--highlighter-bubble-background-color); 378 shape-rendering: crispEdges; 379 } 380 381 .geometry-editor-label-text { 382 fill: var(--highlighter-bubble-text-color); 383 font: var(--highlighter-font-family); 384 font-size: 10px; 385 text-anchor: middle; 386 dominant-baseline: middle; 387 } 388 389 /* Rulers Highlighter */ 390 391 .rulers-highlighter-elements { 392 shape-rendering: crispEdges; 393 pointer-events: none; 394 position: fixed; 395 top: 0; 396 left: 0; 397 } 398 399 .rulers-highlighter-elements > g { 400 opacity: var(--highlighter-rulers-opacity); 401 } 402 403 .rulers-highlighter-elements > g > rect { 404 fill: #fff; 405 } 406 407 .rulers-highlighter-ruler-graduations { 408 stroke: #bebebe; 409 } 410 411 .rulers-highlighter-ruler-markers { 412 stroke: var(--grey-80); 413 } 414 415 .rulers-highlighter-horizontal-labels > text, 416 .rulers-highlighter-vertical-labels > text { 417 stroke: none; 418 fill: var(--grey-80); 419 font: var(--highlighter-font-family); 420 font-size: 9px; 421 dominant-baseline: hanging; 422 } 423 424 .rulers-highlighter-horizontal-labels > text { 425 text-anchor: start; 426 } 427 428 .rulers-highlighter-vertical-labels > text { 429 transform: rotate(-90deg); 430 text-anchor: end; 431 } 432 433 .viewport-size-highlighter-viewport-infobar-container { 434 shape-rendering: crispEdges; 435 background-color: var(--highlighter-viewport-size-background-color); 436 color: var(--grey-80); 437 font: var(--highlighter-font-family); 438 font-variant-numeric: tabular-nums; 439 position: fixed; 440 top: 30px; 441 right: 0; 442 font-size: 12px; 443 padding: 4px; 444 445 &.viewport-size-on-resize-highlighter { 446 top: 0; 447 } 448 } 449 450 /* Measuring Tool Highlighter */ 451 452 .measuring-tool-tool { 453 pointer-events: auto; 454 } 455 456 .measuring-tool-root { 457 position: absolute; 458 top: 0; 459 left: 0; 460 pointer-events: auto; 461 cursor: crosshair; 462 } 463 464 .measuring-tool-elements { 465 position: absolute; 466 } 467 468 .measuring-tool-root path { 469 shape-rendering: geometricPrecision; 470 pointer-events: auto; 471 } 472 473 .measuring-tool-root .measuring-tool-box-path, 474 .measuring-tool-root .measuring-tool-diagonal-path { 475 fill: rgba(135, 206, 235, 0.6); 476 stroke: var(--highlighter-guide-color); 477 } 478 479 .measuring-tool-root circle { 480 stroke: var(--highlighter-guide-color); 481 stroke-width: 2px; 482 fill: #fff; 483 vector-effect: non-scaling-stroke; 484 } 485 486 .measuring-tool-root circle.highlight { 487 fill: var(--highlighter-guide-color); 488 } 489 490 .measuring-tool-handler-top, 491 .measuring-tool-handler-bottom { 492 cursor: ns-resize; 493 } 494 495 .measuring-tool-handler-right, 496 .measuring-tool-handler-left { 497 cursor: ew-resize; 498 } 499 500 .measuring-tool-handler-topleft, 501 .measuring-tool-handler-bottomright { 502 cursor: nwse-resize; 503 } 504 505 .measuring-tool-handler-topright, 506 .measuring-tool-handler-bottomleft { 507 cursor: nesw-resize; 508 } 509 510 .mirrored .measuring-tool-handler-topleft, 511 .mirrored .measuring-tool-handler-bottomright { 512 cursor: nesw-resize; 513 } 514 515 .mirrored .measuring-tool-handler-topright, 516 .mirrored .measuring-tool-handler-bottomleft { 517 cursor: nwse-resize; 518 } 519 520 [class^="measuring-tool-handler"].dragging { 521 fill: var(--highlighter-guide-color); 522 } 523 524 .dragging .measuring-tool-box-path, 525 .dragging .measuring-tool-diagonal-path { 526 opacity: 0.45; 527 } 528 529 .measuring-tool-label-size, 530 .measuring-tool-label-position { 531 position: absolute; 532 top: 0; 533 left: 0; 534 display: inline-block; 535 border-radius: 4px; 536 padding: 4px; 537 white-space: pre-line; 538 font: var(--highlighter-font-family); 539 font-size: 10px; 540 pointer-events: none; 541 user-select: none; 542 box-sizing: border-box; 543 } 544 545 .measuring-tool-label-position { 546 color: #fff; 547 background: hsla(214, 13%, 24%, 0.8); 548 } 549 550 .measuring-tool-label-size { 551 color: var(--highlighter-bubble-text-color); 552 background: var(--highlighter-bubble-background-color); 553 border: 1px solid var(--highlighter-bubble-border-color); 554 line-height: 1.5em; 555 } 556 557 [class^="measuring-tool-guide"] { 558 stroke: var(--highlighter-guide-color); 559 stroke-dasharray: 5 3; 560 shape-rendering: crispEdges; 561 } 562 563 /* Eye Dropper */ 564 565 .eye-dropper-root { 566 --magnifier-width: 96px; 567 --magnifier-height: 96px; 568 /* Width accounts for all color formats (hsl being the longest) */ 569 --label-width: 160px; 570 --label-height: 23px; 571 --background-color: #e0e0e0; 572 color: #333; 573 574 position: fixed; 575 /* Tool start position. This should match the X/Y defines in JS */ 576 top: 100px; 577 left: 100px; 578 579 /* Prevent interacting with the page when hovering and clicking */ 580 pointer-events: auto; 581 582 /* Offset the UI so it is centered around the pointer */ 583 transform: translate(calc(var(--magnifier-width) / -2), calc(var(--magnifier-height) / -2)); 584 585 filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.4)); 586 587 /* We don't need the UI to be reversed in RTL locales, otherwise the # would appear 588 to the right of the hex code. Force LTR */ 589 direction: ltr; 590 } 591 592 .eye-dropper-canvas { 593 image-rendering: -moz-crisp-edges; 594 cursor: none; 595 width: var(--magnifier-width); 596 height: var(--magnifier-height); 597 border-radius: 50%; 598 box-shadow: 0 0 0 3px var(--background-color); 599 display: block; 600 } 601 602 .eye-dropper-color-container { 603 background-color: var(--background-color); 604 border-radius: 2px; 605 width: var(--label-width); 606 height: var(--label-height); 607 position: relative; 608 609 --label-horizontal-center: translateX(calc((var(--magnifier-width) - var(--label-width)) / 2)); 610 --label-horizontal-left: translateX(calc((-1 * var(--label-width) + var(--magnifier-width) / 2))); 611 --label-horizontal-right: translateX(calc(var(--magnifier-width) / 2)); 612 --label-vertical-top: translateY(calc((-1 * var(--magnifier-height)) - var(--label-height))); 613 614 /* By default the color label container sits below the canvas. 615 Here we just center it horizontally */ 616 transform: var(--label-horizontal-center); 617 transition: transform 0.1s ease-in-out; 618 } 619 620 /* If there isn't enough space below the canvas, we move the label container to the top */ 621 .eye-dropper-root[top] .eye-dropper-color-container { 622 transform: var(--label-horizontal-center) var(--label-vertical-top); 623 } 624 625 /* If there isn't enough space right of the canvas to horizontally center the label 626 container, offset it to the left */ 627 .eye-dropper-root[left] .eye-dropper-color-container { 628 transform: var(--label-horizontal-left); 629 } 630 631 .eye-dropper-root[left][top] .eye-dropper-color-container { 632 transform: var(--label-horizontal-left) var(--label-vertical-top); 633 } 634 635 /* If there isn't enough space left of the canvas to horizontally center the label 636 container, offset it to the right */ 637 .eye-dropper-root[right] .eye-dropper-color-container { 638 transform: var(--label-horizontal-right); 639 } 640 641 .eye-dropper-root[right][top] .eye-dropper-color-container { 642 transform: var(--label-horizontal-right) var(--label-vertical-top); 643 } 644 645 .eye-dropper-color-preview { 646 width: 16px; 647 height: 16px; 648 position: absolute; 649 inset-inline-start: 3px; 650 inset-block-start: 3px; 651 box-shadow: 0 0 0 black; 652 border: solid 1px #fff; 653 forced-color-adjust: none; 654 } 655 656 .eye-dropper-color-value { 657 text-shadow: 1px 1px 1px #fff; 658 font: var(--highlighter-font-family); 659 font-size: var(--highlighter-font-size); 660 text-align: center; 661 padding: 4px 0; 662 } 663 664 /* Paused Debugger Overlay */ 665 666 .paused-dbg-root { 667 position: fixed; 668 /* Don't set explicit height/width as those might cause issues when resizing the page (see Bug 1865312) */ 669 inset: 0; 670 671 display: flex; 672 align-items: center; 673 flex-direction: column; 674 675 /* We don't have access to DevTools themes here, but some of these colors come from the 676 themes. Theme variable names are given in comments. */ 677 --text-color: #585959; /* --theme-body-color-alt */ 678 --toolbar-background: #fcfcfc; /* --theme-toolbar-background */ 679 --toolbar-border: #dde1e4; /* --theme-splitter-color */ 680 --toolbar-box-shadow: 0 2px 2px 0 rgba(155, 155, 155, 0.26); /* --rdm-box-shadow */ 681 --overlay-background: #dde1e4a8; 682 } 683 684 .paused-dbg-root[overlay] { 685 background-color: var(--overlay-background); 686 pointer-events: auto; 687 } 688 689 .paused-dbg-toolbar { 690 /* Show the toolbar at the top, but not too high to prevent it overlaping OS toolbar on Android */ 691 margin-top: 30px; 692 display: inline-flex; 693 user-select: none; 694 695 color: var(--text-color); 696 box-shadow: var(--toolbar-box-shadow); 697 background-color: var(--toolbar-background); 698 border: 1px solid var(--toolbar-border); 699 border-radius: 4px; 700 701 font: var(--highlighter-font-family); 702 font-size: var(--highlighter-font-size); 703 } 704 705 .paused-dbg-toolbar button { 706 margin: 8px 4px 6px 6px; 707 width: 16px; 708 height: 16px; 709 mask-repeat: no-repeat; 710 mask-position: center; 711 mask-size: 16px 16px; 712 background-color: var(--text-color); 713 714 border: 0; 715 appearance: none; 716 } 717 718 .paused-dbg-divider { 719 width: 1px; 720 height: 16px; 721 margin-top: 10px; 722 background-color: var(--toolbar-border); 723 } 724 725 .paused-dbg-reason, 726 .paused-dbg-step-button-wrapper, 727 .paused-dbg-resume-button-wrapper { 728 margin-top: 2px; 729 margin-bottom: 2px; 730 } 731 732 .paused-dbg-step-button-wrapper, 733 .paused-dbg-resume-button-wrapper { 734 margin-left: 2px; 735 margin-right: 2px; 736 } 737 738 button.paused-dbg-step-button { 739 margin-left: 6px; 740 margin-right: 6px; 741 mask-image: url(resource://devtools-shared-images/stepOver.svg); 742 padding: 0; 743 } 744 745 button.paused-dbg-resume-button { 746 margin-right: 6px; 747 mask-image: url(resource://devtools-shared-images/resume.svg); 748 padding: 0; 749 } 750 751 .paused-dbg-step-button-wrapper.hover, 752 .paused-dbg-resume-button-wrapper.hover { 753 background-color: var(--toolbar-border); 754 border-radius: 2px; 755 } 756 757 .paused-dbg-reason { 758 padding: 3px 16px; 759 margin: 8px 0; 760 font: var(--highlighter-font-family); 761 font-size: var(--highlighter-font-size); 762 } 763 764 /* Remote Node Picker Notice Highlighter */ 765 766 #node-picker-notice-root { 767 position: fixed; 768 max-width: 100vw; 769 /* Position at the bottom of the screen so it doesn't get into the user's way */ 770 bottom: 0; 771 left: 0; 772 right: 0; 773 774 z-index: 2; 775 776 display: flex; 777 align-items: center; 778 flex-direction: column; 779 780 /* We don't have access to DevTools themes here, but some of these colors come from the 781 themes. Theme variable names are given in comments. */ 782 --text-color: #585959; /* --theme-body-color-alt */ 783 --toolbar-background: #fcfcfc; /* --theme-toolbar-background */ 784 --toolbar-border: #dde1e4; /* --theme-splitter-color */ 785 --toolbar-button-hover-background: rgba(12, 12, 13, 0.15); /* --theme-toolbarbutton-hover-background */ 786 --toolbar-box-shadow: 0 2px 2px 0 rgba(155, 155, 155, 0.26); /* --rdm-box-shadow */ 787 } 788 789 #node-picker-notice-root[overlay] { 790 pointer-events: auto; 791 } 792 793 #node-picker-notice-toolbar { 794 display: flex; 795 align-items: center; 796 gap: 8px; 797 798 padding: 8px 16px; 799 800 color: var(--text-color); 801 box-shadow: var(--toolbar-box-shadow); 802 background-color: var(--toolbar-background); 803 border: 1px solid var(--toolbar-border); 804 border-radius: 2px; 805 806 font: var(--highlighter-font-family); 807 font-size: var(--highlighter-font-size); 808 809 user-select: none; 810 } 811 812 #node-picker-notice-info { 813 font: var(--highlighter-font-family); 814 font-size: var(--highlighter-font-size); 815 text-align: center; 816 } 817 818 #node-picker-notice-icon { 819 width: 16px; 820 height: 16px; 821 822 background-image: url(resource://devtools-shared-images/command-pick.svg); 823 -moz-context-properties: fill; 824 fill: currentColor; 825 826 background-size: contain; 827 background-repeat: no-repeat; 828 } 829 830 #node-picker-notice-icon.touch { 831 background-image: url(resource://devtools-shared-images/command-pick-remote-touch.svg); 832 } 833 834 #node-picker-notice-hide-button { 835 border: 0; 836 border-radius: 2px; 837 appearance: none; 838 background-color: var(--toolbar-border); 839 color: currentColor; 840 font-size: 1em; 841 padding-inline: 4px; 842 } 843 844 /* We can't use :hover as it wouldn't work if the page is paused, so we add a specific class for this */ 845 #node-picker-notice-hide-button.hover { 846 background-color: var(--toolbar-button-hover-background); 847 } 848 849 /* Shapes highlighter */ 850 851 .shapes-root { 852 pointer-events: none; 853 } 854 855 .shapes-shape-container { 856 position: absolute; 857 overflow: visible; 858 } 859 860 .shapes-polygon, 861 .shapes-ellipse, 862 .shapes-rect, 863 .shapes-bounding-box, 864 .shapes-rotate-line, 865 .shapes-quad { 866 fill: transparent; 867 stroke: var(--highlighter-guide-color); 868 shape-rendering: geometricPrecision; 869 vector-effect: non-scaling-stroke; 870 } 871 872 .shapes-markers { 873 fill: #fff; 874 } 875 876 .shapes-markers-outline { 877 fill: var(--highlighter-guide-color); 878 } 879 880 .shapes-marker-hover { 881 fill: var(--highlighter-guide-color); 882 } 883 884 /* Accessible highlighter */ 885 886 .accessible-infobar { 887 min-width: unset; 888 } 889 890 .accessible-infobar-text { 891 display: grid; 892 grid-template-areas: 893 "role name" 894 "audit audit"; 895 grid-template-columns: min-content 1fr; 896 } 897 898 .accessible-infobar-role { 899 grid-area: role; 900 color: #9cdcfe; 901 } 902 903 .accessible-infobar-name { 904 grid-area: name; 905 } 906 907 .accessible-infobar-audit { 908 grid-area: audit; 909 padding-top: 5px; 910 padding-bottom: 2px; 911 } 912 913 .accessible-bounds { 914 fill: var(--highlighter-accessibility-bounds-color); 915 opacity: var(--highlighter-accessibility-bounds-opacity); 916 } 917 918 @media (prefers-reduced-motion) { 919 .use-simple-highlighters .accessible-bounds { 920 fill: none; 921 stroke: var(--highlighter-accessibility-bounds-color); 922 stroke-width: 3; 923 } 924 } 925 926 .accessible-infobar-name, 927 .accessible-infobar-audit { 928 color: var(--highlighter-infobar-color); 929 } 930 931 .accessible-infobar-audit .accessible-contrast-ratio:empty::before, 932 .accessible-infobar-audit .accessible-contrast-ratio:empty::after, 933 .accessible-infobar-name:empty { 934 display: none; 935 } 936 937 .accessible-infobar-audit .accessible-contrast-ratio::before { 938 content: ""; 939 height: 8px; 940 width: 8px; 941 display: inline-flex; 942 background-color: var(--accessibility-highlighter-contrast-ratio-color); 943 box-shadow: 944 0 0 0 1px var(--grey-40), 945 4px 3px var(--accessibility-highlighter-contrast-ratio-bg), 946 4px 3px 0 1px var(--grey-40); 947 margin-inline-start: 3px; 948 margin-inline-end: 9px; 949 } 950 951 .accessible-infobar-audit .accessible-contrast-ratio::after { 952 margin-inline-start: 2px; 953 } 954 955 .accessible-infobar-audit .accessible-contrast-ratio.AA::after, 956 .accessible-infobar-audit .accessible-contrast-ratio.AAA::after { 957 color: #90e274; 958 } 959 960 .accessible-infobar-audit .accessible-audit::before, 961 .accessible-infobar-audit .accessible-contrast-ratio.FAIL::after { 962 display: inline-block; 963 width: 12px; 964 height: 12px; 965 content: ""; 966 vertical-align: -2px; 967 background-position: center; 968 background-repeat: no-repeat; 969 -moz-context-properties: fill; 970 } 971 972 .accessible-infobar-audit .accessible-contrast-ratio.FAIL:after { 973 color: #e57180; 974 margin-inline-start: 3px; 975 background-image: url(resource://devtools-shared-images/error-small.svg); 976 fill: var(--red-40); 977 } 978 979 .accessible-infobar-audit .accessible-contrast-ratio.AA::after { 980 content: "AA\2713"; 981 } 982 983 .accessible-infobar-audit .accessible-contrast-ratio.AAA::after { 984 content: "AAA\2713"; 985 } 986 987 .accessible-infobar-audit .accessible-contrast-ratio-label, 988 .accessible-infobar-audit .accessible-contrast-ratio-separator::before { 989 margin-inline-end: 3px; 990 } 991 992 .accessible-infobar-audit .accessible-contrast-ratio-separator::before { 993 content: "-"; 994 margin-inline-start: 3px; 995 } 996 997 .accessible-infobar-audit .accessible-audit { 998 display: block; 999 padding-block-end: 5px; 1000 } 1001 1002 .accessible-infobar-audit .accessible-audit:last-child { 1003 padding-block-end: 0; 1004 } 1005 1006 .accessible-infobar-audit .accessible-audit::before { 1007 margin-inline-end: 4px; 1008 background-image: none; 1009 fill: currentColor; 1010 } 1011 1012 .accessible-infobar-audit .accessible-audit.FAIL::before { 1013 background-image: url(resource://devtools-shared-images/error-small.svg); 1014 fill: var(--red-40); 1015 } 1016 1017 .accessible-infobar-audit .accessible-audit.WARNING::before { 1018 background-image: url(resource://devtools-shared-images/alert-small.svg); 1019 fill: var(--yellow-60); 1020 } 1021 1022 .accessible-infobar-audit .accessible-audit.BEST_PRACTICES::before { 1023 background-image: url(resource://devtools-shared-images/info-small.svg); 1024 } 1025 1026 .accessible-infobar-name { 1027 border-inline-start: 1px solid #5a6169; 1028 margin-inline-start: 6px; 1029 padding-inline-start: 6px; 1030 } 1031 1032 /* Tabbing-order highlighter */ 1033 1034 .tabbing-order-infobar { 1035 min-width: unset; 1036 } 1037 1038 .tabbing-order .tabbing-order-infobar-container { 1039 font-size: calc(var(--highlighter-font-size) + 2px); 1040 } 1041 1042 .tabbing-order .tabbing-order-bounds { 1043 position: absolute; 1044 display: block; 1045 outline: 2px solid #000; 1046 outline-offset: -2px; 1047 } 1048 1049 .tabbing-order.focused .tabbing-order-bounds { 1050 outline-color: var(--blue-60); 1051 } 1052 1053 .tabbing-order.focused .tabbing-order-infobar { 1054 background-color: var(--blue-60); 1055 } 1056 1057 .tabbing-order.focused .tabbing-order-infobar-text { 1058 text-decoration: underline; 1059 } 1060 1061 .tabbing-order.focused .tabbing-order-infobar:after { 1062 border-top-color: var(--blue-60); 1063 border-bottom-color: var(--blue-60); 1064 }