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/. */
6 * Debug Target Info layout
7 * +------------+--------------+------------------------+
8 * | connection | runtime info | target info icon + text |
9 * +------------+--------------+------------------------+
12 --border-inline-end-width: 1px;
13 --padding-inline-end-size: 24px;
15 background: var
(--theme-tab-toolbar-background
);
16 border-bottom: 1px solid var
(--theme-splitter-color
);
19 color: var
(--theme-toolbar-color
);
23 .toolbox-always-on-top {
27 background-color: transparent
;
28 border: 2px solid transparent
;
33 text-overflow: ellipsis
;
37 .toolbox-always-on-top::after {
42 background-size: cover
;
43 background-image: url
("chrome://devtools/skin/images/command-always-on-top-window.svg");
44 -moz-context-properties: fill
;
46 margin-inline-start: 5px;
49 .toolbox-always-on-top:focus {
51 background-color: var
(--theme-toolbar-hover
);
52 box-shadow: var
(--toolbox-button-box-shadow-focus
);
55 --toolbox-button-box-shadow-focus: 0 0 0 1px #0a84ff inset
, 0 0 0 1px #0a84ff, 0 0 0 4px rgba
(10, 132, 255, 0.3);
58 .toolbox-always-on-top:hover {
59 background-color: var
(--theme-toolbar-hover
);
60 border-color: var
(--tab-line-hover-color
);
63 @media (prefers-reduced-motion: no-preference
) {
64 .toolbox-always-on-top.checked:not(.toolbox-is-focused) {
65 animation: 0.5s linear
0s 1 normal blink-always-on-top
;
68 @keyframes blink-always-on-top
{
70 background-color: var
(--theme-toolbar-background-highlighted
);
73 background-color: transparent
;
78 .toolbox-always-on-top
.checked:not
(:active
),
79 .toolbox-always-on-top:not(.checked):active {
80 color: var
(--theme-icon-checked-color
);
83 .toolbox-always-on-top
.checked:hover:not
(:active
),
84 .toolbox-always-on-top:not(.checked):hover:active {
85 border-color: var
(--tab-line-selected-color
);
89 * Debug Target labels with icon layout
90 * +------+------------------------+---------------+
91 * | icon | label text (bold) | optional text |
92 * | 20px | max-content | max-content |
93 * +------+------------------------+---------------+
95 .debug-target-info .iconized-label {
100 grid-template-columns: 20px auto auto
;
101 padding: 0 var
(--padding-inline-end-size
);
104 .debug-target-navigation {
111 .debug-target-info .iconized-label:not(:last-child) {
112 border-inline-end: var
(--border-inline-end-width
) solid var
(--theme-splitter-color
);
115 .debug-target-info .iconized-label img {
120 .debug-target-info img {
121 -moz-context-properties: fill
;
122 fill: var
(--theme-toolbar-color
);
126 * XXX: This was added to match the padding 8px used by the reload button.
127 * This padding makes the debug target component taller and also creates
128 * spacing with the debug-target-title separator.
129 * See Bug 1641920 for improving the CSS of the DebugTargetInfo component.
131 .debug-target-info .debug-target-url-readonly {
135 .debug-target-info .navigation-button {
140 background: var
(--theme-toolbarbutton-background
);
141 --border-inline-end-width: 0;
144 .debug-target-info .navigation-button > img:-moz-locale-dir(rtl) {
145 transform: scaleX
(-1);
148 .debug-target-info .navigation-button:hover {
149 background-color: var
(--toolbarbutton-hover-background
);
152 .debug-target-info .navigation-button:focus {
153 box-shadow: var
(--toolbox-button-box-shadow-focus
);
156 .debug-target-info .navigation-button:active {
157 background-color: var
(--theme-toolbarbutton-active-background
);
160 .debug-target-info .navigation-button img {
161 fill: var
(--theme-toolbarbutton-color
);
164 .debug-target-info .navigation-button:active img {
165 fill: var
(--theme-toolbarbutton-active-color
);
168 .debug-target-info .debug-target-url {
175 /* Add some inline-end padding when the debug target url is the last child */
176 .debug-target-info .debug-target-url:is(:last-child) {
177 padding-inline-end: var
(--padding-inline-end-size
);
180 .debug-target-info .debug-target-url-input {
181 border: 1px solid var
(--theme-toolbarbutton-active-background
);
184 padding-inline-start: 10px;
185 /* Ensure that the url is displayed correctly for RTL locales. */
186 unicode-bidi: plaintext
;
187 text-align: match-parent
;
190 .debug-target-info
.debug-target-url-input
,
191 .debug-target-info .debug-target-url-form {
199 /* For narrow devtool width, we define the each column width of tabbar.
200 Defined layout is as follow:
202 -------------------------------------------------
203 | Picker | tooltabs | commands | controls |
204 | auto | 26px ~ 1fr | auto | max-content|
205 -------------------------------------------------
208 grid-template-columns: auto minmax
(26px, 1fr) auto max-content
;
209 background: var
(--theme-tab-toolbar-background
);
210 border-bottom: 1px solid var
(--theme-splitter-color
);
211 box-sizing: border-box
;
215 .dragging #toolbox-panel-iframe-webconsole {
216 pointer-events: none
;
219 .toolbox-tabs-wrapper {
225 /* These classes use to stretch the tool tabs wrapper width if toolbox does'n
226 have start buttons or end buttons element. */
228 .devtools-tabbar .toolbox-tabs-wrapper {
229 grid-column-start: 2;
233 .devtools-tabbar-has-start .toolbox-tabs-wrapper {
234 grid-column-start: 1;
237 .devtools-tabbar-has-end .toolbox-tabs-wrapper {
253 /* Set flex attribute to Toolbox buttons and Picker container so,
254 they don't overlap with the tab bar */
255 #toolbox-buttons-start,
256 #toolbox-buttons-end,
259 align-items: stretch
;
276 text-overflow: ellipsis
;
277 color: var
(--theme-toolbar-color
);
278 background-color: transparent
;
279 /* adjust outline offset so it's not clipped */
280 --theme-outline-offset: -2px;
283 .devtools-tab-label {
285 mask-image: linear-gradient
(to left
, transparent
0, black
6px);
286 /* Set the end padding on the label to make sure the label gets faded out properly */
287 padding-inline-end: 8px;
291 .devtools-tab-label:-moz-locale-dir(rtl) {
292 mask-image: linear-gradient
(to right
, transparent
0, black
6px);
295 .devtools-tab .devtools-tab-badge {
296 color: var
(--theme-highlight-blue
);
299 margin-inline-start: 4px;
302 .devtools-tab-icon-only {
306 .devtools-tab:hover {
307 background-color: var
(--theme-toolbar-hover
);
310 /* Remove system control border from devtools-tab. */
311 .devtools-tab::-moz-focus-inner {
315 .devtools-tab:hover:active {
316 background-color: var
(--theme-toolbar-hover-active
);
319 .devtools-tab.selected {
320 color: var
(--theme-toolbar-selected-color
);
323 .devtools-tab > img {
326 margin-inline: 8px 6px;
329 vertical-align: text-top
;
331 -moz-context-properties: fill
;
332 fill: var
(--theme-icon-color
);
335 .devtools-tab.selected > img {
336 fill: var
(--theme-toolbar-selected-color
);
339 .devtools-tab.highlighted > img {
340 fill: var
(--theme-toolbar-highlighted-color
);
343 /* Toolbox controls */
345 .devtools-tabbar-button {
350 justify-content: center
;
356 font-family: inherit
;
359 color: var
(--theme-icon-color
);
360 background-color: transparent
;
361 /* adjust outline offset so it's not clipped */
362 --theme-outline-offset: -2px;
365 /* Button icon style */
366 .devtools-tabbar-button::before {
369 display: inline-block
;
373 -moz-context-properties: fill
;
375 background-position: center
;
376 background-repeat: no-repeat
;
379 .devtools-tabbar-button::-moz-focus-inner {
383 .devtools-tabbar-button:hover
,
384 .devtools-tabbar-button.checked {
385 background-color: var
(--theme-toolbar-hover
);
388 .devtools-tabbar-button
.checked
,
389 .devtools-tabbar-button:active {
390 color: var
(--theme-icon-checked-color
);
393 .devtools-tabbar-button:disabled {
394 color: var
(--theme-icon-dimmed-color
) !important
;
395 background-color: transparent
!important
;
398 #tools-chevron-menu-button::before
{
399 background-image: url
("chrome://devtools/skin/images/command-chevron.svg");
402 #tools-chevron-menu-button:-moz-locale-dir
(rtl
)::before
{
403 transform: rotate
(180deg);
406 /* On OSX the cursor turns into a window-resizing cursor at the edges of the
407 * window, so bring the end of the toolbox in. */
408 :root
[platform
="mac"] #toolbox-controls
{
409 margin-inline-end: 2px;
412 #toolbox-buttons-start > .devtools-separator
{
416 #toolbox-buttons-end > .devtools-separator
{
420 #toolbox-close::before
{
421 background-image: url
("chrome://devtools/skin/images/close.svg");
424 #toolbox-meatball-menu-button::before
{
425 background-image: url
("chrome://devtools/skin/images/more.svg");
428 #toolbox-meatball-menu-dock-bottom {
429 --menuitem-icon-image: url
("chrome://devtools/skin/images/dock-bottom.svg");
432 #toolbox-meatball-menu-dock-left {
433 --menuitem-icon-image: url
("chrome://devtools/skin/images/dock-side-left.svg");
436 #toolbox-meatball-menu-dock-right {
437 --menuitem-icon-image: url
("chrome://devtools/skin/images/dock-side-right.svg");
440 #toolbox-meatball-menu-dock-window {
441 --menuitem-icon-image: url
("chrome://devtools/skin/images/dock-undock.svg");
444 #toolbox-meatball-menu-dock-window:-moz-locale-dir
(rtl
) .label::before
{
445 transform: scaleX
(-1);
448 #toolbox-meatball-menu-splitconsole {
449 --menuitem-icon-image: url
("chrome://devtools/skin/images/command-console.svg");
452 #toolbox-meatball-menu-noautohide {
453 --menuitem-icon-image: url
("chrome://devtools/skin/images/command-noautohide.svg");
456 #toolbox-meatball-menu-pseudo-locale-accented {
457 --menuitem-icon-image: url
("chrome://devtools/skin/images/command-accented.svg");
460 #toolbox-meatball-menu-pseudo-locale-bidi {
461 --menuitem-icon-image: url
("chrome://devtools/skin/images/command-bidi.svg");
464 #toolbox-meatball-menu-settings {
465 --menuitem-icon-image: url
("chrome://devtools/skin/images/settings.svg");
469 background-color: transparent
!important
;
470 font-variant-numeric: tabular-nums
;
473 .toolbox-error::before {
474 background-image: url
("resource://devtools-shared-images/error-small.svg");
475 fill: var
(--theme-icon-error-color
) !important
;
478 .toolbox-error:hover {
479 background-color: var
(--toolbarbutton-hover-background
) !important
;
482 /* Command buttons */
484 #command-button-pick {
488 #command-button-pick::before
{
489 background-image: url
("resource://devtools-shared-images/command-pick.svg");
492 #command-button-pick.accessibility::before
{
493 background-image: url
("chrome://devtools/skin/images/command-pick-accessibility.svg");
496 #command-button-pick.remote-fenix::before
{
497 background-image: url
("resource://devtools-shared-images/command-pick-remote-touch.svg");
500 /* Command button images */
502 #command-button-screenshot::before
{
503 background-image: url
("chrome://devtools/skin/images/command-screenshot.svg");
506 #command-button-responsive::before
{
507 background-image: url
("chrome://devtools/skin/images/command-responsivemode.svg");
508 -moz-context-properties: fill
, fill-opacity
;
512 #command-button-responsive.checked::before
{
516 .theme-dark #command-button-responsive.checked::before {
520 #command-button-experimental-prefs::before
{
521 background-image: url
("chrome://global/skin/icons/experiments.svg");
522 background-size: cover
;
525 .experimental-pref-icon::before {
527 background-image: url
("chrome://devtools/skin/images/help.svg");
528 -moz-context-properties: fill
;
529 fill: var
(--theme-body-color
);
531 background-size: 12px;
536 #command-button-rulers::before
{
537 background-image: url
("chrome://devtools/skin/images/command-rulers.svg");
540 #command-button-measure::before
{
541 background-image: url
("chrome://devtools/skin/images/command-measure.svg");
544 #command-button-frames::before
{
545 background-image: url
("chrome://devtools/skin/images/command-frames.svg");
546 -moz-context-properties: fill
, fill-opacity
;
550 #command-button-frames.checked::before
{
554 .theme-dark #command-button-frames.checked::before {
558 /* Tooltip of frames menu */
560 #command-button-frames-panel > .tooltip-panel
{
565 #toolbox-frame-menu span
{
567 text-overflow: ellipsis
;
575 visibility: collapse
;
578 .toolbox-panel[selected] {
583 * When panels are collapsed or hidden, making sure that they are also
584 * inaccessible by keyboard. This is not the case by default because the are
585 * predominantly hidden using visibility: collapse; style or collapsed
589 #toolbox-panel-webconsole[collapsed
] * {
590 -moz-user-focus: ignore
;
593 #toolbox-panel-webconsole {
598 #toolbox-panel-webconsole[collapsed
],
599 #toolbox-deck[collapsed
] {
600 height: 0 !important
;
601 min-height: 0 !important
;
604 #toolbox-deck:not
([collapsed
]),
605 #toolbox-panel-webconsole[expanded
] {
606 /* Override the splitter-set height and flex instead */
607 height: auto
!important
;
611 * Ensure that selected toolbox panel's contents are keyboard accessible as they
612 * are explicitly made not to be when hidden (default).
614 .toolbox-panel[selected] * {
615 -moz-user-focus: normal
;
618 .toolbox-panel-iframe {
619 /* Allow toolbox frames to shrink under the default size and flex */
625 /* Let the component gain focus when a click hits an empty area */
626 -moz-user-focus: normal
;
631 /* Set large flex to allow the toolbox-panel-webconsole to have a
632 height set to a small value without flexing to fill up extra
633 space. There must be a flex on both to ensure that the console
634 panel itself is sized properly */
638 #toolbox-container:focus
{
642 /* Toolbox tabs reordering */
643 #toolbox-container.tabs-reordering
> .theme-body
{
644 pointer-events: none
;
647 #toolbox-container.tabs-reordering
648 .devtools-tab:not
(.selected
):hover
650 background: transparent
;
655 #toolbox-container.tabs-reordering
.devtools-tab
.selected
{
656 background-color: var
(--theme-toolbar-hover
);