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/. */
5 @import url
("chrome://devtools/skin/splitters.css");
6 @namespace html url
("http://www.w3.org/1999/xhtml");
9 /* Bug 1458224: the initial `font-size` is different on Mac/Windows
10 * (appears fixed to 11px) and Linux (bigger, depends on user settings).
11 * Workaround: specify font-size on root, on form inputs, and whenever
12 * we're using the `font` shorthand. */
14 font-size: var
(--theme-body-font-size
);
16 /* TODO(bug 1022557): Perhaps we want to allow forced colors in devtools */
17 forced-color-adjust: none
;
19 --tab-line-hover-color: rgba
(0,0,0,.2);
20 --tab-line-selected-color: var
(--blue-50
);
21 --toggle-thumb-color: white
;
22 --toggle-track-color: var
(--grey-50
);
24 --searchbox-no-match-background-color: #ffe5e5;
25 --searchbox-no-match-stroke-color: var
(--red-60
);
35 --tab-line-hover-color: rgba
(255,255,255,.2);
36 --toggle-thumb-color: var
(--grey-40
);
38 --searchbox-no-match-background-color: #402325;
39 --searchbox-no-match-stroke-color: var
(--red-50
);
42 :root
[platform
="mac"] {
43 --monospace-font-family: Menlo
, monospace
;
46 :root
[platform
="win"] {
47 --monospace-font-family: Consolas
, monospace
;
50 :root
[platform
="linux"] {
51 --monospace-font-family: monospace
;
55 * Customize the dark theme's scrollbar colors to avoid excessive contrast.
58 scrollbar-color: var
(--grey-50
) var
(--theme-splitter-color
);
62 * Customize scrollbar colors on Linux + light theme, to avoid visual conflicts
63 * between the light theme and the selected GTK theme (see bug 1471163).
64 * This removes GTK scrollbars and uses a fallback design (see bug 1464723).
66 :root
[platform
="linux"].theme-light
{
67 scrollbar-color: var
(--grey-40
) var
(--grey-20
);
71 background-color: var
(--theme-selection-background
);
72 color: var
(--theme-selection-color
);
76 font-family: var
(--monospace-font-family
);
77 font-size: var
(--theme-code-font-size
);
81 * For text that needs to be cut with an ellipsis …
83 .devtools-ellipsis-text {
85 text-overflow: ellipsis
;
90 * Override global.css input styles
97 * Override wrong system font from forms.css
98 * Bug 1458224: buttons use a wrong default font-size on Linux
100 html|button
, html|select
, html|input
{
102 font-size: var
(--theme-body-font-size
);
105 /* Devtools rely on the old Gecko/HTML4 button hit testing */
107 pointer-events: none
;
110 /* Prevent buttons from having a text selection highlight. Bug 1546366 */
121 /* Autocomplete Popup */
122 .devtools-autocomplete-popup {
125 /* Devtools autocompletes display technical english keywords and should be displayed
126 using LTR direction. */
127 direction: ltr
!important
;
130 /* Reset list styles. */
131 .devtools-autocomplete-popup ul {
135 .devtools-autocomplete-popup ul
,
136 .devtools-autocomplete-popup li {
140 .devtools-autocomplete-listbox {
141 --autocomplete-item-padding-inline: 8px;
142 --autocomplete-item-color-swatch-size: 1em;
143 --autocomplete-item-color-swatch-margin-inline: 5px;
144 appearance: none
!important
;
145 background-color: transparent
;
146 border-width: 0px !important
;
151 box-sizing: border-box
;
154 .devtools-autocomplete-listbox .autocomplete-item {
156 box-sizing: border-box
;
157 background-color: transparent
;
158 color: var
(--theme-popup-color
);
159 padding: 1px var
(--autocomplete-item-padding-inline
);
161 text-overflow: ellipsis
;
166 .devtools-autocomplete-listbox
.autocomplete-item
> .initial-value
,
167 .devtools-autocomplete-listbox .autocomplete-item > .autocomplete-value {
173 .devtools-autocomplete-listbox .autocomplete-item > .autocomplete-postlabel {
176 padding-inline-end: 3px;
179 .devtools-autocomplete-listbox .autocomplete-item > .autocomplete-count {
183 .devtools-autocomplete-listbox .autocomplete-swatch {
186 box-shadow: 0 0 0 1px #c4c4c4;
187 width: var
(--autocomplete-item-color-swatch-size
);
188 height: var
(--autocomplete-item-color-swatch-size
);
189 vertical-align: middle
;
190 /* align the swatch with its value */
192 margin-inline: var
(--autocomplete-item-color-swatch-margin-inline
);
193 display: inline-block
;
197 /* Rest of the dark and light theme */
198 .devtools-autocomplete-popup
,
199 .tooltip-panel
.devtools-autocomplete-popup
,
201 .CodeMirror-Tern-tooltip {
202 border: 1px solid var
(--theme-popup-border-color
);
203 background-color: var
(--theme-popup-background
);
204 color: var
(--theme-popup-color
);
207 .devtools-autocomplete-listbox .autocomplete-item:hover {
208 background-color: var
(--theme-popup-dimmed
);
211 .devtools-autocomplete-listbox
.autocomplete-selected
,
212 .devtools-autocomplete-listbox .autocomplete-selected:hover {
213 background-color: var
(--theme-selection-background
);
214 color: var
(--theme-selection-color
);
217 .devtools-autocomplete-listbox .autocomplete-selected > .initial-value {
221 /* Autocomplete list clone used for accessibility. */
223 .devtools-autocomplete-list-aria-clone {
224 /* Cannot use display:none or visibility:hidden : screen readers ignore the element. */
232 .devtools-autocomplete-list-aria-clone li {
233 /* Prevent screen readers from prefacing every item with 'bullet'. */
234 list-style-type: none
;
237 /* Keyboard focus highlight styles */
240 outline: var
(--theme-focus-outline
);
241 outline-offset: var
(--theme-outline-offset
);
242 box-shadow: var
(--theme-outline-box-shadow
);
244 /* override properties set in global-shared.css for links */
246 outline-color: var
(--theme-focus-outline-color
) !important
;
247 outline-width: var
(--theme-focus-outline-size
) !important
;
250 /* offset the outline for checkbox and radio buttons so it doesn't conflict with existing border */
251 :is
(input
[type
="radio"], input
[type
="checkbox"], checkbox
)& {
256 /* Toolbar buttons */
257 .devtools-togglebutton
,
260 background: transparent
;
263 color: var
(--theme-body-color
);
264 transition: background-color
0.05s ease-in-out
;
270 /* Button text should not wrap on multiple lines */
274 .devtools-togglebutton {
276 /* Separate the outline from the button as it might have a similar background color (after Bug 1590432) */
280 /* Remove system form border from devtools-button. */
281 .devtools-button::-moz-focus-inner {
285 /* Button with text */
286 .devtools-button:not(:empty) {
288 background: var
(--toolbarbutton-background
);
292 .devtools-button::before {
294 display: inline-block
;
295 vertical-align: middle
;
299 transition: opacity
0.05s ease-in-out
;
300 color: var
(--theme-icon-color
);
302 -moz-context-properties: fill
;
304 background-position: center
;
305 background-repeat: no-repeat
;
308 /* Reveal the icon */
309 .devtools-button:empty::before {
313 .devtools-button:is(.checked, [aria-pressed="true"])::before {
314 color: var
(--theme-icon-checked-color
);
317 /* Icon-only buttons */
318 .devtools-button:hover::before
,
319 .devtools-button:is(.checked, [aria-pressed="true"])::before {
324 .devtools-button:disabled {
325 pointer-events: none
;
326 opacity: 0.5 !important
;
329 .devtools-button:empty:not([aria-expanded="true"]):hover {
330 background: var
(--toolbarbutton-hover-background
);
333 /* Standalone buttons */
334 .devtools-button[data-standalone] {
337 border: 1px solid transparent
;
338 background: var
(--toolbarbutton-background
);
341 .theme-light .devtools-button[data-standalone] {
342 border-color: rgba
(138,161,180,0.2);
345 /* Selectable button which is unchecked. */
347 .devtools-button:not
(:empty
, .checked
, [aria-pressed
="true"]):hover
,
348 .devtools-button:empty:is
(:hover:active
,.checked
, [aria-pressed
="true"]),
349 .devtools-button[aria-haspopup="menu"][aria-expanded="true"] {
350 background-color: var
(--toolbarbutton-hover-background
);
353 .devtools-button:not(:empty, .checked, [aria-pressed="true"]):hover:active {
354 background-color: var
(--theme-selection-background-hover
);
357 .devtools-button:not(:empty, .checked, [aria-pressed="true"]):focus {
358 background-color: var
(--toolbarbutton-focus-background
);
359 color: var
(--toolbarbutton-focus-color
);
362 .devtools-togglebutton:not([aria-pressed="true"]) {
363 background: var
(--theme-toolbarbutton-background
);
364 color: var
(--theme-toolbarbutton-color
);
367 .devtools-togglebutton:hover:not([aria-pressed="true"], :active) {
368 background-color: var
(--theme-toolbarbutton-hover-background
);
371 /* Selectable button which is checked. */
373 .devtools-button:not(:empty):is(.checked, [aria-pressed="true"]) {
374 background: var
(--toolbarbutton-checked-background
);
375 color: var
(--toolbarbutton-checked-color
);
378 background-color: var
(--toolbarbutton-checked-focus-background
);
382 .devtools-togglebutton[aria-pressed="true"] {
383 background-color: var
(--theme-toolbarbutton-checked-background
);
384 color: var
(--theme-toolbarbutton-checked-color
);
387 .devtools-togglebutton[aria-pressed="true"]:hover:not(:active) {
388 background: var
(--theme-toolbarbutton-checked-hover-background
);
389 color: var
(--theme-toolbarbutton-checked-hover-color
);
392 .devtools-togglebutton:active {
393 background: var
(--theme-toolbarbutton-active-background
);
394 color: var
(--theme-toolbarbutton-active-color
);
397 .devtools-togglebutton::-moz-focus-inner {
398 border-color: transparent
;
403 .devtools-button.devtools-clear-icon::before {
404 background-image: url
("chrome://devtools/skin/images/clear.svg");
407 .devtools-option-toolbarbutton {
408 list-style-image: url
("chrome://devtools/skin/images/settings.svg");
411 .devtools-button.devtools-feature-callout::after {
412 content: url
("chrome://global/skin/icons/badge-blue.svg");
424 .devtools-searchinput
,
425 .devtools-filterinput {
430 border: 1px solid transparent
;
431 background-color: var
(--theme-body-background
);
432 color: var
(--theme-body-color
);
436 /* override UA style */
438 /* Set a dimmed color that still gives us enough contrast */
439 color: var
(--theme-text-color-alt
);
443 .devtools-searchinput
,
444 .devtools-filterinput {
445 padding-inline-start: 22px;
446 background-position: 7px center
;
447 background-size: 12px;
448 background-repeat: no-repeat
;
449 -moz-context-properties: fill
;
450 fill: var
(--theme-icon-dimmed-color
);
453 .devtools-searchinput {
454 background-image: url
(chrome://devtools
/skin
/images
/search
.svg
);
457 .devtools-filterinput {
458 background-image: url
(chrome://devtools
/skin
/images
/filter-small
.svg
);
461 .devtools-searchinput:-moz-locale-dir
(rtl
),
462 .devtools-searchinput:dir
(rtl
),
463 .devtools-filterinput:-moz-locale-dir
(rtl
),
464 .devtools-filterinput:dir(rtl) {
465 background-position-x: right
7px;
468 .devtools-searchinput
.textbox-input::placeholder
,
469 .devtools-filterinput .textbox-input::placeholder {
473 /* Searchbox with extra button(s) (MDN help or clear button) */
474 .devtools-searchbox {
475 display: inline-flex
;
478 border: 1px solid transparent
;
480 box-sizing: border-box
;
483 .devtools-searchbox
> .devtools-searchinput
,
484 .devtools-searchbox > .devtools-filterinput {
485 /* Those classes can be applied on <input>, which have a default styling.
486 We want .devtools-searchbox to handle the background, border and outline, so we
487 need to reset them here */
488 background-color: transparent
;
497 /* Display an outline on the container when the child input is focused. If another element
498 is focused (e.g. a button), we only want the outline on that element */
499 .devtools-searchbox:focus-within:has(input:focus-visible) {
500 outline: var
(--theme-focus-outline
);
501 outline-offset: -2px;
503 &.devtools-searchbox-no-match
{
504 outline-color: var
(--searchbox-no-match-stroke-color
);
508 .devtools-searchbox-no-match {
509 background-color: var
(--searchbox-no-match-background-color
);
510 border-color: var
(--searchbox-no-match-stroke-color
);
513 /* Clear icon within the searchbox */
514 .devtools-searchinput-clear {
522 background-color: transparent
;
523 background-image: url
("chrome://devtools/skin/images/search-clear.svg");
524 -moz-context-properties: fill
, fill-opacity
;
525 fill: var
(--theme-icon-color
);
529 .devtools-searchbox-no-match > .devtools-searchinput-clear {
530 fill: var
(--searchbox-no-match-stroke-color
);
533 .devtools-searchinput-clear:hover {
537 /* MDN link within the searchbox */
538 .devtools-searchbox .learn-more-link::before {
542 .devtools-searchbox:not(:hover) .learn-more-link {
546 .devtools-searchbox .devtools-searchinput-summary {
550 color: var
(--theme-comment
);
554 /* Autocomplete popup within the searchbox */
555 .devtools-searchbox .devtools-autocomplete-popup {
560 line-height: initial
!important
;
561 /* See bug - 1414609. z-index is greater than 1000 so that searchbox's z-index
562 is more than z-index of requests-list-headers-wrapper in netmonitor */
566 /* Twisty and checkbox controls */
572 background-image: url
("chrome://devtools/skin/images/arrow.svg");
573 background-position: center
;
574 background-repeat: no-repeat
;
575 background-size: 10px;
576 -moz-context-properties: fill
;
577 fill: var
(--theme-icon-dimmed-color
);
578 transform: rotate
(-90deg);
581 /* Mirror the twisty for rtl direction */
582 .theme-twisty:dir
(rtl
),
583 .theme-twisty:-moz-locale-dir(rtl) {
584 transform: rotate
(90deg);
587 .theme-selected ~ .theme-twisty {
588 fill: var
(--theme-selection-color
);
594 [aria-expanded
="true"]
599 .theme-twisty[invisible] {
604 .devtools-throbber::before {
606 display: inline-block
;
607 vertical-align: bottom
;
608 margin-inline-end: 0.5em;
611 border: 2px solid currentColor
;
612 border-right-color: transparent
;
614 animation: 1.1s linear throbber-spin infinite
;
617 @keyframes throbber-spin
{
622 transform: rotate
(360deg);
626 /* Common tabs styles */
638 border-inline-start: 1px solid var
(--theme-splitter-color
);
640 background: var
(--theme-tab-toolbar-background
);
641 background-image: url
("chrome://devtools/skin/images/dropmarker.svg");
642 background-repeat: no-repeat
;
643 background-position: center
;
644 -moz-context-properties: fill
;
645 fill: var
(--theme-icon-color
);
646 /* The button is often displayed next to the window edge, so adjust the layout to make the offset visible */
647 outline-offset: -2px;
650 .all-tabs-menu:hover {
651 background-color: var
(--theme-toolbar-hover
);
654 .all-tabs-menu:hover:active {
655 background-color: var
(--theme-toolbar-hover-active
);
664 background: transparent
;
665 transition: transform
250ms var
(--animation-curve
), opacity
250ms var
(--animation-curve
);
667 transform: scaleX
(0);
670 .devtools-tab:hover
.devtools-tab-line
,
671 .tabs-menu-item:hover .devtools-tab-line {
672 background: var
(--tab-line-hover-color
);
674 transform: scaleX
(1);
677 .devtools-tab
.selected
.devtools-tab-line
,
678 .tabs-menu-item.is-active .devtools-tab-line {
679 background: var
(--tab-line-selected-color
);
681 transform: scaleX
(1);
684 @media (prefers-reduced-motion
) {
690 .devtools-tab:not(.selected):focus .devtools-tab-line {
691 background: var
(--tab-line-hover-color
);
693 transform: scaleX
(1);
696 /* No result message styles */
698 .devtools-sidepanel-no-result {
703 line-height: calc
(16 / 12);
706 /* Checkbox Toggle */
708 .devtools-checkbox-toggle {
710 /* Reset native checkbox styling. */
712 background-color: var
(--toggle-track-color
);
714 /* Change font-size to scale. */
719 border: 1px solid transparent
;
720 box-sizing: content-box
;
721 /* Animate the thumb position between states of the checkbox. */
722 transition: background-color
.1s ease-out
;
725 .devtools-checkbox-toggle[disabled]{
729 /* For right-to-left layout, the toggle thumb goes in the opposite direction. */
730 html
[dir
="rtl"] .devtools-checkbox-toggle
{
734 .devtools-checkbox-toggle:checked {
736 background-color: var
(--blue-55
);
739 html
[dir
="rtl"] .devtools-checkbox-toggle:checked
{
743 .devtools-checkbox-toggle::before {
745 width: calc
(1em - .3em);
746 height: calc
(1em - .3em);
747 transform: translateY
(.15em) translateX
(var
(--x-pos
));
751 background-color: var
(--toggle-thumb-color
);
752 transition: transform
.1s ease-out
;
755 .devtools-checkbox-toggle:checked::before {
756 background-color: white
;