inspector.css 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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. :root {
  6. --eyedropper-image: url(images/command-eyedropper.svg);
  7. }
  8. .theme-firebug {
  9. --eyedropper-image: url(images/firebug/command-eyedropper.svg);
  10. }
  11. :root.theme-light {
  12. --breadcrumbs-border-color: #f3f3f3;
  13. }
  14. :root.theme-dark {
  15. --breadcrumbs-border-color: #454d5d;
  16. }
  17. * {
  18. box-sizing: border-box;
  19. }
  20. /* Make sure to hide scroll bars for the parent window */
  21. window {
  22. overflow: hidden;
  23. }
  24. /* The main Inspector panel container. */
  25. .inspector-responsive-container {
  26. height: 100vh;
  27. }
  28. /* The main panel layout. This area consists of a toolbar, markup view
  29. and breadcrumbs bar. */
  30. #inspector-main-content {
  31. /* Subtract 1 pixel from the panel height. It's puzzling why this
  32. is needed, but if not presented the entire Inspector panel
  33. content jumps 1 pixel up when the Toolbox is opened. */
  34. height: calc(100% - 1px);
  35. /* This min-width avoids a visual glitch when moving the splitter quickly to the left.
  36. See bug 1307408 comment #12. */
  37. min-width: 125px;
  38. display: flex;
  39. flex-direction: column;
  40. flex: 1 1 auto;
  41. }
  42. /* Inspector Panel Splitter */
  43. #inspector-splitter-box {
  44. height: 100vh;
  45. width: 100vw;
  46. position: fixed;
  47. }
  48. /* Minimum dimensions for the Inspector splitter areas. */
  49. #inspector-splitter-box .uncontrolled,
  50. #inspector-splitter-box .controlled {
  51. min-height: 50px;
  52. min-width: 50px;
  53. overflow-x: hidden;
  54. }
  55. /* Set a minimum width of 200px for tab content to avoid breaking the layout when resizing
  56. the sidebar tab to small width. If a specific panel supports smaller width, this should
  57. be overridden on a panel-by-panel basis */
  58. .inspector-tabpanel {
  59. min-width: 200px;
  60. }
  61. #inspector-splitter-box .controlled.pane-collapsed {
  62. visibility: collapse;
  63. }
  64. /* Use flex layout for the Inspector toolbar. For now, it's done
  65. specifically for the Inspector toolbar since general rule applied
  66. on .devtools-toolbar breaks breadcrumbs and also toolbars in other
  67. panels (e.g. webconsole, debugger), these are not ready for HTML
  68. layout yet. */
  69. #inspector-toolbar.devtools-toolbar {
  70. display: flex;
  71. }
  72. #inspector-toolbar.devtools-toolbar .devtools-toolbar-spacer {
  73. flex-grow: 1;
  74. display: inline-block;
  75. }
  76. /* Add element toolbar button */
  77. #inspector-element-add-button::before {
  78. background-image: url("chrome://devtools/skin/images/add.svg");
  79. list-style-image: url("chrome://devtools/skin/images/add.svg");
  80. -moz-user-focus: normal;
  81. }
  82. #inspector-searchlabel {
  83. overflow: hidden;
  84. margin-inline-end: 2px;
  85. }
  86. #inspector-search {
  87. flex: unset;
  88. }
  89. /* Eyedropper toolbar button */
  90. #inspector-eyedropper-toggle {
  91. /* Required to display tooltip when eyedropper is disabled in non-HTML documents */
  92. pointer-events: auto;
  93. }
  94. #inspector-eyedropper-toggle::before {
  95. background-image: var(--eyedropper-image);
  96. }
  97. #inspector-sidebar-toggle-box {
  98. line-height: initial;
  99. }
  100. #inspector-breadcrumbs-toolbar {
  101. padding: 0px;
  102. border-bottom-width: 0px;
  103. border-top-width: 1px;
  104. border-top-color: var(--breadcrumbs-border-color);
  105. /* Bug 1262668 - Use the same background as the body so the breadcrumbs toolbar doesn't
  106. get mistaken as a splitter */
  107. background-color: var(--theme-body-background);
  108. display: block;
  109. position: relative;
  110. }
  111. #inspector-breadcrumbs-toolbar,
  112. #inspector-breadcrumbs-toolbar * {
  113. box-sizing: border-box;
  114. }
  115. #inspector-breadcrumbs {
  116. display: flex;
  117. /* Break out of the XUL flexbox, so the splitter can still shrink the
  118. markup view even if the contents of the breadcrumbs are wider than
  119. the new width. */
  120. position: absolute;
  121. top: 0;
  122. left: 0;
  123. bottom: 0;
  124. right: 0;
  125. }
  126. #inspector-breadcrumbs .scrollbutton-up,
  127. #inspector-breadcrumbs .scrollbutton-down {
  128. flex: 0;
  129. display: flex;
  130. align-items: center;
  131. }
  132. #inspector-breadcrumbs .html-arrowscrollbox-inner {
  133. flex: 1;
  134. display: flex;
  135. overflow: hidden;
  136. }
  137. #inspector-breadcrumbs .breadcrumbs-widget-item {
  138. white-space: nowrap;
  139. flex-shrink: 0;
  140. font: message-box;
  141. }
  142. #inspector-sidebar-container {
  143. overflow: hidden;
  144. position: relative;
  145. height: 100%;
  146. }
  147. #inspector-sidebar {
  148. position: absolute;
  149. top: 0;
  150. bottom: 0;
  151. left: 0;
  152. right: 0;
  153. }
  154. /* Override `-moz-user-focus:ignore;` from toolkit/content/minimal-xul.css */
  155. .inspector-tabpanel > * {
  156. -moz-user-focus: normal;
  157. }
  158. /* "no results" warning message displayed in the ruleview and in the computed view */
  159. #ruleview-no-results,
  160. #computedview-no-results {
  161. color: var(--theme-body-color-inactive);
  162. text-align: center;
  163. margin: 5px;
  164. }
  165. /* Markup Box */
  166. iframe {
  167. border: 0;
  168. }
  169. #markup-box {
  170. width: 100%;
  171. flex: 1;
  172. min-height: 0;
  173. }
  174. #markup-box > iframe {
  175. height: 100%;
  176. width: 100%;
  177. }