commandline.inc.css 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. %if 0
  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. %endif
  6. /* Developer toolbar */
  7. /* NOTE: THESE NEED TO STAY IN SYNC WITH LIGHT-THEME.CSS AND DARK-THEME.CSS.
  8. We are copy/pasting variables from light-theme and dark-theme,
  9. since they aren't loaded in this context (within browser.css). */
  10. :root[devtoolstheme="light"] #developer-toolbar {
  11. --gcli-background-color: #fcfcfc; /* --theme-tab-toolbar-background */
  12. --gcli-input-background: #fcfcfc; /* --theme-toolbar-background */
  13. --gcli-input-focused-background: #ffffff; /* --theme-sidebar-background */
  14. --gcli-input-color: #393f4c; /* --theme-body-color */
  15. --gcli-border-color: #dde1e4; /* --theme-splitter-color */
  16. --selection-background: #4c9ed9; /* --theme-selection-background */
  17. --selection-color: #f5f7fa; /* --theme-selection-color */
  18. --command-line-image: url(chrome://devtools/skin/images/commandline-icon.svg#light-theme); /* --theme-command-line-image */
  19. --command-line-image-focus: url(chrome://devtools/skin/images/commandline-icon.svg#light-theme-focus); /* --theme-command-line-image-focus */
  20. }
  21. :root[devtoolstheme="dark"] #developer-toolbar {
  22. --gcli-background-color: #272b35; /* --theme-toolbar-background */
  23. --gcli-input-background: #272b35; /* --theme-tab-toolbar-background */
  24. --gcli-input-focused-background: #272b35; /* --theme-tab-toolbar-background */
  25. --gcli-input-color: #b6babf; /* --theme-body-color-alt */
  26. --gcli-border-color: #454d5d; /* --theme-splitter-color */
  27. --selection-background: #5675b9; /* --theme-selection-background */
  28. --selection-color: #f5f7fa; /* --theme-selection-color */
  29. --command-line-image: url(chrome://devtools/skin/images/commandline-icon.svg#dark-theme); /* --theme-command-line-image */
  30. --command-line-image-focus: url(chrome://devtools/skin/images/commandline-icon.svg#dark-theme-focus); /* --theme-command-line-image-focus */
  31. }
  32. #developer-toolbar {
  33. -moz-appearance: none;
  34. padding: 0;
  35. min-height: 32px;
  36. background-color: var(--gcli-background-color);
  37. border-top: 1px solid var(--gcli-border-color);
  38. }
  39. #developer-toolbar > toolbarbutton {
  40. -moz-appearance: none;
  41. border: none;
  42. background-color: transparent;
  43. margin: 0;
  44. padding: 0 10px;
  45. width: 32px;
  46. }
  47. .developer-toolbar-button > image {
  48. margin: auto 10px;
  49. }
  50. :root[devtoolstheme="light"] #developer-toolbar > .developer-toolbar-button:not([checked=true]) > image,
  51. :root[devtoolstheme="light"] .gclitoolbar-input-node:not([focused=true])::before {
  52. filter: invert(1);
  53. }
  54. .developer-toolbar-button > .toolbarbutton-icon {
  55. width: 16px;
  56. height: 16px;
  57. }
  58. /* The toolkit close button is low contrast in the dark theme so invert it. */
  59. :root[devtoolstheme="dark"] #developer-toolbar > .close-icon:not(:hover) > image {
  60. filter: invert(1);
  61. }
  62. #developer-toolbar-toolbox-button {
  63. list-style-image: url("chrome://devtools/skin/images/toggle-tools.png");
  64. -moz-image-region: rect(0px, 16px, 16px, 0px);
  65. }
  66. #developer-toolbar-toolbox-button > label {
  67. display: none;
  68. }
  69. #developer-toolbar-toolbox-button:hover {
  70. -moz-image-region: rect(0px, 32px, 16px, 16px);
  71. }
  72. #developer-toolbar-toolbox-button:hover:active {
  73. -moz-image-region: rect(0px, 48px, 16px, 32px);
  74. }
  75. #developer-toolbar-toolbox-button[checked=true] {
  76. -moz-image-region: rect(0px, 64px, 16px, 48px);
  77. }
  78. @media (min-resolution: 1.1dppx) {
  79. #developer-toolbar-toolbox-button {
  80. list-style-image: url("chrome://devtools/skin/images/toggle-tools@2x.png");
  81. -moz-image-region: rect(0px, 32px, 32px, 0px);
  82. }
  83. #developer-toolbar-toolbox-button:hover {
  84. -moz-image-region: rect(0px, 64px, 32px, 32px);
  85. }
  86. #developer-toolbar-toolbox-button:hover:active {
  87. -moz-image-region: rect(0px, 96px, 32px, 64px);
  88. }
  89. #developer-toolbar-toolbox-button[checked=true] {
  90. -moz-image-region: rect(0px, 128px, 32px, 96px);
  91. }
  92. }
  93. /* GCLI */
  94. html|*#gcli-tooltip-frame,
  95. html|*#gcli-output-frame {
  96. padding: 0;
  97. border-width: 0;
  98. background-color: transparent;
  99. }
  100. #gcli-output,
  101. #gcli-tooltip {
  102. border-width: 0;
  103. background-color: transparent;
  104. -moz-appearance: none;
  105. }
  106. .gclitoolbar-input-node,
  107. .gclitoolbar-complete-node {
  108. margin: 0;
  109. -moz-box-align: center;
  110. padding-top: 0;
  111. padding-bottom: 0;
  112. padding-right: 8px;
  113. text-shadow: none;
  114. box-shadow: none;
  115. border-width: 0;
  116. background-color: transparent;
  117. border-radius: 0;
  118. }
  119. .gclitoolbar-input-node {
  120. -moz-appearance: none;
  121. color: var(--gcli-input-color);
  122. background-color: var(--gcli-input-background);
  123. background-repeat: no-repeat;
  124. background-position: 4px center;
  125. box-shadow: 1px 0 0 var(--gcli-border-color) inset,
  126. -1px 0 0 var(--gcli-border-color) inset;
  127. line-height: 32px;
  128. outline-style: none;
  129. padding: 0;
  130. }
  131. .gclitoolbar-input-node[focused="true"] {
  132. background-color: var(--gcli-input-focused-background);
  133. }
  134. .gclitoolbar-input-node::before {
  135. content: "";
  136. display: inline-block;
  137. -moz-box-ordinal-group: 0;
  138. width: 16px;
  139. height: 16px;
  140. margin: 0 2px;
  141. background-image: var(--command-line-image);
  142. }
  143. .gclitoolbar-input-node[focused="true"]::before {
  144. background-image: var(--command-line-image-focus);
  145. }
  146. .gclitoolbar-input-node > .textbox-input-box > html|*.textbox-input::-moz-selection {
  147. background-color: var(--selection-background);
  148. color: var(--selection-color);
  149. text-shadow: none;
  150. }
  151. .gclitoolbar-complete-node {
  152. padding-left: 21px;
  153. background-color: transparent;
  154. color: transparent;
  155. z-index: 100;
  156. pointer-events: none;
  157. }
  158. .gcli-in-incomplete,
  159. .gcli-in-error,
  160. .gcli-in-ontab,
  161. .gcli-in-todo,
  162. .gcli-in-closebrace,
  163. .gcli-in-param,
  164. .gcli-in-valid {
  165. margin: 0;
  166. padding: 0;
  167. }
  168. .gcli-in-incomplete {
  169. border-bottom: 2px dotted #999;
  170. }
  171. .gcli-in-error {
  172. border-bottom: 2px dotted #F00;
  173. }
  174. .gcli-in-ontab {
  175. color: hsl(210,0%,35%);
  176. }
  177. .gcli-in-todo {
  178. color: hsl(210,50%,35%);
  179. }
  180. .gcli-in-closebrace {
  181. color: hsl(0,0%,80%);
  182. }