improve devtools looks somewhat and make them work up to current nightly
[themes.git] / LCARStrek / devtools / toolbars.css
1 /* vim:set ts=2 sw=2 sts=2 et: */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 /* CSS Variables specific to the devtools toolbar that aren't defined by the themes */
7 .theme-light,
8 .theme-dark,
9 .theme-firebug {
10   --toolbar-tab-hover: #FFCF00;
11   --toolbar-tab-hover-active: #FF9F00;
12   --searchbox-background-color: #000000;
13   --searchbox-border-color: #9C9CFF;
14   --searcbox-no-match-background-color: #400000;
15   --searcbox-no-match-border-color: #FF0000;
16   --magnifying-glass-image: url(images/search.svg);
17   --filter-image: url(images/filter.svg);
18   --tool-options-image: url(images/tool-options-tbutton.svg);
19   --icon-filter: invert(1);
20   --checked-icon-filter: url(images/filters.svg#checked-icon-state);
21   --toolbar-button-border-color: #A09090;
22 }
23
24 /* Toolbars */
25 .devtools-toolbar,
26 .devtools-sidebar-tabs tabs {
27   padding: 0;
28   border-width: 0;
29 /*  border-bottom-width: 1px;*/
30   border-style: solid;
31 /*  height: 24px;
32   line-height: 24px;*/
33   box-sizing: border-box;
34   font: 11px "Liberation Sans",Arial,Tahoma,Helvetica,sans-serif;
35 }
36 .devtools-toolbar {
37   height: 24px;
38 }
39
40 .devtools-toolbar {
41   border-bottom: 3px solid var(--theme-body-background);
42 }
43
44 .devtools-toolbar checkbox {
45   /* LCARStrek checkbox colors don't work well against toolbar background */
46   background-color: var(--theme-toolbar-background);
47   padding: 2px;
48   line-height: -moz-block-height;
49 }
50 .devtools-toolbar checkbox .checkbox-check {
51 }
52 .devtools-toolbar checkbox .checkbox-label-box {
53 }
54 .devtools-toolbar checkbox .checkbox-label-box .checkbox-label {
55 }
56
57 /* HTML Checkboxes - a lot copied from global/in-content/common.css */
58 /* Hide the actual checkbox */
59 input[type="checkbox"]:not(#browser-style-checkbox) { /* not() is workaround for old placement of checkbox in label */
60   opacity: 0;
61   width: 0;
62   pointer-events: none;
63   position: absolute;
64 }
65
66 /* Create a box to style as the checkbox */
67 input[type="checkbox"] + label::before {
68   display: inline-block;
69   content: "";
70   vertical-align: middle;
71 }
72
73 .devtools-searchbox + #browser-style-checkbox-label, /* workaround for old placement of checkbox in label */
74 input[type="checkbox"] + label {
75   line-height: 0px;
76   color: var(--theme-capped-toolbar-text);
77 }
78
79 input[type="checkbox"] + label::before {
80   -moz-appearance: none;
81   width: 13px;
82   height: 13px;
83   border-radius: 0;
84   border: 1px solid var(--theme-body-color);
85   margin-inline-end: 3px;
86   margin-inline-start: 2px;
87   background-color: var(--theme-toolbar-background);
88   background-position: center center;
89   background-repeat: no-repeat;
90 }
91
92 input[type="checkbox"]:not(:disabled) + label:hover::before {
93   border-color: var(--theme-hover-background);
94 }
95 .devtools-searchbox + #browser-style-checkbox-label:hover, /* workaround for old placement of checkbox in label */
96 input[type="checkbox"]:not(:disabled) + label:hover {
97   color: var(--theme-hover-background);
98 }
99 input[type="checkbox"]:checked + label::before {
100   background-image: url("chrome://global/skin/in-content/check.svg#check");
101 }
102
103 input[type="checkbox"]:checked:disabled + label::before {
104   background-image: url("chrome://global/skin/in-content/check.svg#check-disabled");
105 }
106 input[type="checkbox"]:checked:not(:disabled) + label:hover::before {
107   background-image: url("chrome://global/skin/in-content/check.svg#check-hover");
108 }
109 input[type="checkbox"]:disabled + label::before {
110   border-color: var(--theme-body-color-inactive);
111 }
112 input[type="checkbox"]:disabled + label {
113   color: var(--theme-body-color-inactive);
114 }
115
116 .devtools-separator {
117   margin: 0 2px;
118   width: 2px;
119   background-image: linear-gradient(transparent 15%, var(--theme-splitter-color) 15%, var(--theme-splitter-color) 85%, transparent 85%);
120   background-size: 1px 100%;
121   background-repeat: no-repeat;
122   background-position: 0, 1px, 2px;
123 }
124
125 /* HTML toolbars - style them LCARStrek-like */
126
127 div.devtools-toolbar {
128   background-size: calc(100% - 30px);
129   background-image: linear-gradient(90deg, var(--theme-capped-toolbar-background), var(--theme-capped-toolbar-background));
130   background-repeat: no-repeat;
131   background-position: center center;
132   display: flex;
133 }
134
135 div.devtools-toolbar::before,
136 div.devtools-toolbar::after {
137   display: flex;
138   content: "";
139   width: 12px;
140   min-height: 16px;
141   background-color: var(--theme-toolbar-caps);
142 }
143
144 div.devtools-toolbar::before {
145   border-radius: 8px 0px 0px 8px;
146   border: none;
147   border-inline-end: 3px solid black;
148   margin-inline-end: 2px;
149 }
150
151 div.devtools-toolbar::after {
152   border-radius: 0px 8px 8px 0px;
153   border: none;
154   border-inline-start: 3px solid black;
155   margin-inline-start: auto; /* originally 2px, but auto makes us able to get flexible free space */
156 }
157
158 /* Toolbar buttons */
159
160 .devtools-menulist,
161 .devtools-toolbarbutton,
162 .devtools-button {
163 }
164
165 .devtools-menulist,
166 .devtools-toolbarbutton {
167 }
168
169 .devtools-toolbarbutton:not([label]) > .toolbarbutton-icon,
170 .devtools-button::before {
171   width: 16px;
172   height: 16px;
173 /*  transition: opacity 0.05s ease-in-out;*/
174 }
175
176 /* HTML buttons */
177 .devtools-button {
178   margin: 0;
179   padding: 0;
180   border: none;
181   border-radius: 3px;
182   min-width: 18px;
183   height: 100%;
184   margin-inline-start: 2px;
185   background: var(--theme-toolbar-background);
186   color: var(--theme-body-color);
187   /* The icon is absolutely positioned in the button using ::before */
188   position: relative;
189 }
190
191 .devtools-button:not([disabled]):hover {
192   background: var(--theme-hover-background);
193   color: var(--theme-hover-color);
194 }
195
196 .devtools-button:not([disabled]):hover:active {
197   background: var(--theme-active-background);
198   color: var(--theme-active-color);
199 }
200
201 /* Menu type buttons and checked states */
202 .devtools-button[checked] {
203   background: var(--theme-selection-background);
204   color: var(--theme-selection-color);
205 }
206
207 .devtools-button::before {
208   content: "";
209   display: block;
210   position: absolute;
211   left: 50%;
212   top: 50%;
213   margin: -8px 0 0 -8px;
214 /*  background-size: cover;
215   background-repeat: no-repeat;*/
216 /*  transition: opacity 0.05s ease-in-out;*/
217 }
218
219 .devtools-button:-moz-focusring {
220   outline: none;
221 }
222
223 /* Standalone buttons */
224 .devtools-button[standalone],
225 .devtools-button[data-standalone],
226 .devtools-toolbarbutton[standalone],
227 .devtools-toolbarbutton[data-standalone],
228 .menu-filter-button {
229   border: none;
230 /*  min-height: 32px; */
231   background-color: var(--theme-button-background);
232   color: var(--theme-button-color);
233   border-radius: 300px;
234 }
235
236 .devtools-button[standalone]:hover,
237 .devtools-button[data-standalone]:hover,
238 .devtools-toolbarbutton[standalone]:hover,
239 .devtools-toolbarbutton[data-standalone]:hover,
240 .menu-filter-button:hover {
241   background-color: var(--theme-hover-background);
242   color: var(--theme-hover-color);
243 }
244
245 .devtools-button[standalone]:hover:active,
246 .devtools-button[data-standalone]:hover:active,
247 .devtools-toolbarbutton[standalone]:hover:active,
248 .devtools-toolbarbutton[data-standalone]:hover:active,
249 .menu-filter-button:hover:active {
250   background-color: var(--theme-active-background);
251   color: var(--theme-active-color);
252 }
253
254 .menu-filter-button.checked {
255   background: var(--theme-selection-background);
256   color: var(--theme-selection-color);
257 }
258
259 .menu-filter-button + .menu-filter-button {
260   margin-inline-start: 2px;
261 }
262
263 .devtools-toolbarbutton[standalone], .devtools-toolbarbutton[data-standalone] {
264 }
265
266 .devtools-toolbarbutton[label][standalone] {
267 }
268
269 .devtools-menulist,
270 .devtools-toolbarbutton,
271 .devtools-button {
272   min-height: 18px;
273 }
274
275 /* Icon button styles */
276 .devtools-toolbarbutton:not([label]),
277 .devtools-toolbarbutton[text-as-image] {
278   min-width: 16px;
279 }
280
281 /* Set flex attribute to Toolbox buttons and Picker container so,
282    they don't overlapp with the tab bar */
283 #toolbox-buttons {
284   display: flex;
285 }
286
287 #toolbox-picker-container {
288   display: flex;
289   margin-inline-start: 1px;
290 }
291
292 .devtools-toolbarbutton:not([label]) > .toolbarbutton-text {
293   display: none;
294 }
295
296 .devtools-toolbar .devtools-toolbarbutton {
297   margin-inline-start: 2px;
298 }
299
300 .devtools-toolbarbutton > .toolbarbutton-icon {
301 }
302
303 /* Menu button styles (eg. web console filters) */
304 .devtools-toolbarbutton[type=menu-button] > .toolbarbutton-menubutton-button {
305 /*  -moz-box-orient: horizontal; */
306 }
307
308 .devtools-toolbarbutton[type=menu-button] {
309 }
310
311 .devtools-toolbarbutton > .toolbarbutton-menubutton-button > .toolbarbutton-icon {
312 }
313
314 .devtools-menulist > .menulist-dropmarker {
315 }
316
317 .devtools-toolbarbutton[type=menu] > .toolbarbutton-menu-dropmarker,
318 .devtools-toolbarbutton[type=menu-button] > .toolbarbutton-menubutton-dropmarker {
319 }
320
321 /* Icon-only buttons */
322 .devtools-button:empty::before,
323 .devtools-toolbarbutton:not([label]):not([disabled]) > image {
324 /*  opacity: 0.8;*/
325 }
326
327 .devtools-button:hover:empty::before,
328 .devtools-button[checked]:empty::before,
329 .devtools-button[open]:empty::before,
330 .devtools-toolbarbutton:not([label]):hover > image,
331 .devtools-toolbarbutton:not([label])[checked=true] > image,
332 .devtools-toolbarbutton:not([label])[open=true] > image {
333 /*  opacity: 1;*/
334 }
335
336 .devtools-button:disabled,
337 .devtools-button[disabled],
338 .devtools-toolbarbutton[disabled] {
339 /*  opacity: 0.5 !important;*/
340 }
341
342 .devtools-button[standalone]::before,
343 .devtools-button[data-standalone]::before,
344 .devtools-button:not([disabled]):hover::before,
345 .devtools-button:not([disabled]):hover:active::before,
346 .devtools-button[checked]:empty::before,
347 .devtools-button[open]:empty::before,
348 .devtools-toolbarbutton[standalone] > image,
349 .devtools-toolbarbutton[data-standalone] > image,
350 .devtools-toolbarbutton:not([disabled]):hover > image,
351 .devtools-toolbarbutton:not([disabled]):hover:active > image,
352 .devtools-toolbarbutton[checked=true] > image,
353 .devtools-toolbarbutton[open=true] > image {
354   filter: var(--checked-icon-filter);
355 }
356
357 .devtools-button[disabled]::before,
358 .devtools-toolbarbutton[disabled] > image {
359   filter: url(images/filters.svg#disabled-icon-state);
360 }
361
362 /* Icon-and-text buttons */
363 .devtools-toolbarbutton.icon-and-text .toolbarbutton-text {
364   margin-inline-start: .5em !important;
365   font-weight: 600;
366 }
367
368 /* Text-only buttons */
369 .devtools-toolbarbutton[label]:not([text-as-image]):not([type=menu-button]),
370 .devtools-toolbarbutton[data-text-only],
371 #toolbox-buttons .devtools-toolbarbutton[text-as-image] {
372 /*  background-color: rgba(0, 0, 0, .2); / Splitter */
373 }
374
375 /* Text-only button states */
376 .devtools-button:not(:empty):not([disabled]):hover,
377 #toolbox-buttons .devtools-toolbarbutton:not([disabled])[text-as-image]:hover,
378 .devtools-toolbarbutton:not(:-moz-any([checked=true],[disabled],[text-as-image]))[label]:hover {
379 /*  background: rgba(0, 0, 0, .3); / Splitters */
380 }
381
382 .devtools-button:not(:empty):not([disabled]):hover:active,
383 #toolbox-buttons .devtools-toolbarbutton:not([disabled])[text-as-image]:hover:active,
384 .devtools-toolbarbutton:not(:-moz-any([checked=true],[disabled],[text-as-image]))[label]:hover:active {
385 /*  background: rgba(0, 0, 0, .4); / Splitters */
386 }
387
388 .devtools-toolbarbutton:not([disabled])[label][checked=true],
389 .devtools-toolbarbutton:not([disabled])[label][open],
390 .devtools-button:not(:empty)[checked=true],
391 #toolbox-buttons .devtools-toolbarbutton[text-as-image][checked=true] {
392 /*  background: rgba(29, 79, 115, .7); / Select highlight blue /
393   color: var(--theme-selection-color); */
394 }
395
396 .devtools-menulist[open=true],
397 .devtools-toolbarbutton[open=true],
398 .devtools-toolbarbutton[open=true]:hover,
399 .devtools-toolbarbutton[open=true]:hover:active,
400 .devtools-toolbarbutton[checked=true],
401 .devtools-toolbarbutton[checked=true]:hover,
402 #toolbox-buttons .devtools-toolbarbutton[text-as-image][checked] {
403 /*  background: rgba(29, 79, 115, .8); / Select highlight blue /
404   color: var(--theme-selection-color); */
405 }
406
407 :root {
408   --clear-icon-url: url("chrome://devtools/skin/images/clear.svg");
409 }
410
411 .devtools-button.devtools-clear-icon::before {
412   background-image: var(--clear-icon-url);
413 }
414
415 .devtools-toolbarbutton.devtools-clear-icon {
416   list-style-image: var(--clear-icon-url);
417 }
418
419 .devtools-option-toolbarbutton {
420   list-style-image: var(--tool-options-image);
421 }
422
423 .devtools-toolbarbutton-group > .devtools-toolbarbutton:last-child {
424 }
425
426 .devtools-toolbarbutton-group + .devtools-toolbarbutton {
427 }
428
429 .devtools-separator + .devtools-toolbarbutton {
430 }
431
432 /* Text input */
433
434 .devtools-textinput,
435 .devtools-searchinput,
436 .devtools-filterinput {
437 /*  -moz-appearance: none;
438   margin: 1 3px;
439   border: 1px solid;
440   border-radius: 2px;
441   padding: 4px 6px;
442   border-color: var(--theme-splitter-color);
443   font: message-box;*/
444   margin-top: 0;
445   margin-bottom: 0;
446 }
447
448 :root[platform="mac"] .devtools-searchinput,
449 :root[platform="mac"] .devtools-textinput {
450 /*  border-radius: 20px;*/
451 }
452
453 .devtools-searchinput,
454 .devtools-filterinput {
455 /*  margin-top: 1px;
456   margin-bottom: 1px;
457   padding: 0;*/
458   padding-inline-start: 22px;
459   padding-inline-end: 4px;
460   background-position: 8px center;
461   background-size: 11px 11px;
462   background-repeat: no-repeat;
463   font-size: inherit;
464 }
465
466 .devtools-searchinput {
467   background-image: var(--magnifying-glass-image);
468 }
469
470 .devtools-filterinput {
471   background-image: var(--filter-image);
472 }
473
474 .devtools-searchinput:-moz-locale-dir(rtl),
475 .devtools-searchinput:dir(rtl),
476 .devtools-filterinput:-moz-locale-dir(rtl),
477 .devtools-filterinput:dir(rtl) {
478   background-position: calc(100% - 8px) center;
479 }
480
481 .devtools-searchinput > .textbox-input-box > .textbox-search-icons > .textbox-search-icon,
482 .devtools-filterinput > .textbox-input-box > .textbox-search-icons > .textbox-search-icon {
483   visibility: hidden;
484 }
485
486 .devtools-searchinput .textbox-input::-moz-placeholder,
487 .devtools-filterinput .textbox-input::-moz-placeholder {
488   font-style: normal;
489 }
490
491 /* Searchbox is a div container element for a search input element */
492 .devtools-searchbox {
493   display: flex;
494   flex: 1;
495   position: relative;
496 }
497
498 /* The spacing is accomplished with a padding on the searchbox */
499 .devtools-searchbox > .devtools-textinput,
500 .devtools-searchbox > .devtools-searchinput {
501 }
502
503 .devtools-textinput:focus,
504 .devtools-searchinput:focus,
505 .devtools-filterinput:focus {
506   border-color: var(--theme-focus-border-color-textbox);
507 /*  box-shadow: var(--theme-focus-box-shadow-textbox);*/
508   transition: all 0.2s ease-in-out;
509   outline: none;
510 }
511
512 /* Don't add 'double spacing' for inputs that are at beginning / end
513    of a toolbar (since the toolbar has it's own spacing). */
514 .devtools-toolbar > .devtools-textinput:first-child,
515 .devtools-toolbar > .devtools-searchinput:first-child,
516 .devtools-toolbar > .devtools-filterinput:first-child {
517 }
518 .devtools-toolbar > .devtools-textinput:last-child,
519 .devtools-toolbar > .devtools-searchinput:last-child,
520 .devtools-toolbar > .devtools-filterinput:last-child {
521 }
522 .devtools-toolbar > .devtools-searchbox:first-child {
523 }
524 .devtools-toolbar > .devtools-searchbox:last-child {
525 }
526
527 .devtools-rule-searchbox {
528   -moz-box-flex: 1;
529   width: 100%;
530 /*  font: inherit;*/
531 }
532
533 .devtools-rule-searchbox[filled] {
534   background-color: var(--searchbox-background-color);
535   border-color: var(--searchbox-border-color);
536   padding-inline-end: 23px;
537 }
538
539 .devtools-style-searchbox-no-match {
540   background-color: var(--searchbox-no-match-background-color) !important;
541   border-color: var(--searchbox-no-match-border-color) !important;
542 }
543
544 .devtools-searchinput-clear {
545   position: absolute;
546   top: 3.5px;
547   right: 7px;
548   padding: 0;
549   border: 0;
550   width: 16px;
551   height: 16px;
552   background-position: 0 0;
553   background-repeat: no-repeat;
554   background-color: transparent;
555 }
556
557 .devtools-searchinput-clear:dir(rtl) {
558   right: unset;
559   left: 7px;
560 }
561
562 .devtools-searchinput-clear {
563   background-image: url("chrome://devtools/skin/images/search-clear.svg");
564 }
565
566 .devtools-style-searchbox-no-match + .devtools-searchinput-clear {
567   background-image: url("chrome://devtools/skin/images/search-clear-failed.svg") !important;
568 }
569
570 .devtools-searchinput-clear:hover {
571   background-position: -16px 0;
572 }
573
574 .devtools-searchinput > .textbox-input-box > .textbox-search-icons > .textbox-search-clear,
575 .devtools-filterinput > .textbox-input-box > .textbox-search-icons > .textbox-search-clear {
576   list-style-image: url("chrome://devtools/skin/images/search-clear.svg");
577   -moz-image-region: rect(0, 16px, 16px, 0);
578 }
579
580 .devtools-searchinput > .textbox-input-box > .textbox-search-icons > .textbox-search-clear:hover,
581 .devtools-filterinput > .textbox-input-box > .textbox-search-icons > .textbox-search-clear:hover {
582   -moz-image-region: rect(0, 32px, 16px, 16px);
583 }
584
585 /* In-tools sidebar */
586
587 .devtools-sidebar-tabs {
588   height: 100%;
589 }
590
591 .devtools-sidebar-tabs > tabpanels {
592   padding: 0;
593   border: 0;
594 }
595
596 .devtools-sidebar-tabs tabs {
597   position: static;
598   overflow: hidden;
599 }
600
601 .devtools-sidebar-alltabs {
602 /*  -moz-appearance: none;
603   height: 24px;
604   line-height: 24px;
605   padding: 0 4px;
606   margin: 0;
607   border-width: 0 0 1px 0;
608   border-inline-start-width: 1px;
609   border-style: solid;*/
610 }
611
612 .devtools-sidebar-alltabs .toolbarbutton-icon {
613   display: none;
614 }
615
616 .devtools-sidebar-tabs tabs > .tabs-right,
617 .devtools-sidebar-tabs tabs > .tabs-left {
618   display: none;
619 }
620
621 .devtools-sidebar-tabs tabs > tab {
622   min-width: 78px;
623   text-align: center;
624   -moz-box-flex: 1;
625   position: static;
626   margin-top: 0;
627 }
628
629 .devtools-sidebar-tabs tabs > tab:-moz-focusring {
630   position: static;
631 }
632
633 .devtools-sidebar-tabs tabs > tab:first-of-type {
634   margin-inline-start: 0;
635 }
636
637 .devtools-sidebar-tabs tabs > tab:last-of-type {
638   border-inline-end-width: 0;
639 }
640
641 .devtools-sidebar-tabs tabs > tab {
642 }
643
644 .devtools-sidebar-tabs tabs > tab[selected],
645 .devtools-sidebar-tabs tabs > tab[selected] + tab {
646 }
647
648 .devtools-sidebar-tabs tabs > tab:first-child {
649 }
650
651 .devtools-sidebar-tabs tabs > tab:hover {
652 }
653
654 .devtools-sidebar-tabs tabs > tab:hover:active {
655 }
656
657 .devtools-sidebar-tabs tabs > tab[selected],
658 .devtools-sidebar-tabs tabs > tab[selected]:hover:active {
659 }
660
661 .hidden-labels-box:not(.visible) > label,
662 .hidden-labels-box.visible ~ .hidden-labels-box > label:last-child {
663   display: none;
664 }
665
666 .devtools-invisible-splitter {
667   border-color: transparent;
668   background-color: transparent;
669 }
670
671 .devtools-horizontal-splitter,
672 .devtools-side-splitter {
673 /*  background-color: var(--theme-splitter-color);*/
674 }
675
676 /* HACK around hardcoded stylings for the HTML-based sidebar tabs */
677 .tabs .tabs-menu-item,
678 .theme-dark .tabs .tabs-menu-item,
679 .theme-light .tabs .tabs-menu-item {
680   margin: 0;
681   margin-inline-end: 3px !important;
682   padding: 0 !important;
683   border-radius: 8px 8px 0 0;
684   border: 0 !important;
685   background-color: var(--theme-button-background);
686 }
687 .tabs .tabs-menu-item a {
688   color: var(--theme-button-color) !important;
689   padding: 0px 3px !important;
690 }
691 .tabs .tabs-menu-item.is-active {
692   height: auto !important;
693 }
694 .tabs .tabs-navigation {
695   height: auto !important;
696   border: 0 !important;
697   border-bottom: 3px solid  var(--theme-body-background) !important;
698 }
699
700 /* Throbbers */
701
702 .devtools-throbber::before {
703   content: "";
704   display: inline-block;
705   vertical-align: bottom;
706   margin-inline-end: 0.5em;
707   width: 1em;
708   height: 1em;
709   border: 2px solid currentColor;
710   border-right-color: transparent;
711   border-radius: 50%;
712   animation: 1.1s linear throbber-spin infinite;
713 }
714
715 @keyframes throbber-spin {
716   from {
717     transform: none;
718   }
719   to {
720     transform: rotate(360deg);
721   }
722 }