tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

inspector.css (7077B)


      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/. */
      4 
      5 :root {
      6  --min-container-width: 300px;
      7  --pseudo-class-text-color: var(--yellow-75);
      8 
      9  --invalid-at-computed-value-time-icon: url(resource://devtools-shared-images/error-small.svg);
     10  --invalid-at-computed-value-time-fill-color: var(--theme-highlight-red);
     11 
     12  &.theme-dark {
     13    --pseudo-class-text-color: var(--yellow-50);
     14  }
     15 }
     16 
     17 * {
     18  box-sizing: border-box;
     19 }
     20 
     21 /* Make sure to hide scroll bars for the parent window */
     22 window {
     23  overflow: hidden;
     24 }
     25 
     26 /* The main Inspector panel container. */
     27 .inspector-responsive-container {
     28  height: 100vh;
     29  overflow: hidden;
     30 }
     31 
     32 /* The main panel layout. This area consists of a toolbar, markup view
     33  and breadcrumbs bar. */
     34 #inspector-main-content {
     35  /* Subtract 1 pixel from the panel height. It's puzzling why this
     36    is needed, but if not presented the entire Inspector panel
     37    content jumps 1 pixel up when the Toolbox is opened. */
     38  height: calc(100% - 1px);
     39  /* This min-width avoids a visual glitch when moving the splitter quickly to the left.
     40     See bug 1307408 comment #12. */
     41  min-width: 125px;
     42  display: flex;
     43  flex-direction: column;
     44 
     45  /* the panel is not visible at first… */
     46  visibility: hidden;
     47  /* … only when it's being initialized */
     48  &.initialized {
     49    visibility: visible;
     50  }
     51 }
     52 
     53 /* Inspector Panel Splitter */
     54 
     55 #inspector-splitter-box {
     56  height: 100vh;
     57  width: 100vw;
     58  position: fixed;
     59 }
     60 
     61 /* Minimum dimensions for the Inspector splitter areas. */
     62 #inspector-splitter-box .uncontrolled,
     63 #inspector-splitter-box .controlled {
     64  min-height: 50px;
     65  min-width: 50px;
     66  overflow-x: hidden;
     67 }
     68 
     69 #tabpanels {
     70  visibility: collapse;
     71 }
     72 
     73 /* Set a minimum width of 200px for tab content to avoid breaking the layout when resizing
     74   the sidebar tab to small width. If a specific panel supports smaller width, this should
     75   be overridden on a panel-by-panel basis */
     76 .inspector-tabpanel {
     77  min-width: 200px;
     78 }
     79 
     80 #inspector-splitter-box .controlled.pane-collapsed {
     81  visibility: collapse;
     82 }
     83 
     84 #inspector-splitter-box .sidebar-toggle::before {
     85  background-image: url("chrome://devtools/skin/images/close-3-pane.svg");
     86  transform: unset;
     87 }
     88 
     89 #inspector-splitter-box .sidebar-toggle.pane-collapsed::before {
     90  background-image: url("chrome://devtools/skin/images/open-3-pane.svg");
     91 }
     92 
     93 /* Flip the icon horizontally when in RTL mode */
     94 #inspector-splitter-box .sidebar-toggle:dir(rtl) {
     95  transform: scaleX(-1);
     96 }
     97 
     98 #inspector-searchlabel-container {
     99  display: flex;
    100  flex-direction: row;
    101  align-items: center;
    102 }
    103 
    104 #inspector-searchlabel-container[hidden] {
    105  display: none;
    106 }
    107 
    108 #inspector-searchnavigation-container {
    109  display: flex;
    110  flex-direction: row;
    111  align-items: center;
    112  justify-content: center;
    113 }
    114 
    115 #inspector-searchnavigation-container[hidden] {
    116  display: none;
    117 }
    118 
    119 #inspector-searchnavigation-container .inspector-searchnavigation-buttons::before {
    120  background-size: 16px;
    121  margin-inline: 0;
    122 }
    123 
    124 #inspector-searchnavigation-button-prev::before {
    125  background-image: url("chrome://devtools/content/debugger/images/arrow-up.svg");
    126 }
    127 
    128 #inspector-searchnavigation-button-next::before {
    129  background-image: url("chrome://devtools/content/debugger/images/arrow-down.svg");
    130 }
    131 
    132 #inspector-searchlabel {
    133  padding: 0 3px;
    134  font-variant-numeric: tabular-nums;
    135  white-space: nowrap;
    136  user-select: none;
    137  color: var(--theme-text-color-alt);
    138 }
    139 
    140 #inspector-search {
    141  container: search-container / inline-size;
    142 }
    143 
    144 @container search-container (inline-size < 200px) {
    145  #inspector-searchlabel {
    146    display: none;
    147  }
    148 }
    149 
    150 /* Add element toolbar button */
    151 #inspector-element-add-button::before {
    152  background-image: url("chrome://devtools/skin/images/add.svg");
    153  background-position: center;
    154  background-size: 14px;
    155  -moz-user-focus: normal;
    156 }
    157 
    158 /* Eyedropper toolbar button */
    159 
    160 #inspector-eyedropper-toggle {
    161  /* Required to display tooltip when eyedropper is disabled in non-HTML documents */
    162  pointer-events: auto;
    163 }
    164 
    165 #inspector-eyedropper-toggle::before {
    166  background-image: url(images/command-eyedropper.svg);
    167  background-position: center;
    168  background-size: 14px;
    169 }
    170 
    171 #inspector-breadcrumbs-toolbar {
    172  padding: 0;
    173  border-bottom-width: 0;
    174  border-top-width: 1px;
    175  border-top-color: var(--theme-splitter-color);
    176  /* Bug 1262668 - Use the same background as the body so the breadcrumbs toolbar doesn't
    177     get mistaken as a splitter */
    178  background-color: var(--theme-body-background);
    179  display: block;
    180  position: relative;
    181 }
    182 
    183 #inspector-breadcrumbs-toolbar,
    184 #inspector-breadcrumbs-toolbar * {
    185  box-sizing: border-box;
    186  direction: ltr;
    187 }
    188 
    189 #inspector-breadcrumbs {
    190  display: flex;
    191  outline-offset: -2px;
    192  /* Break out of the XUL flexbox, so the splitter can still shrink the
    193     markup view even if the contents of the breadcrumbs are wider than
    194     the new width. */
    195  position: absolute;
    196  top: 0;
    197  left: 0;
    198  bottom: 0;
    199  right: 0;
    200 }
    201 
    202 #inspector-breadcrumbs .scrollbutton-up,
    203 #inspector-breadcrumbs .scrollbutton-down {
    204  flex: 0;
    205  display: flex;
    206  align-items: center;
    207 }
    208 
    209 #inspector-breadcrumbs .html-arrowscrollbox-inner {
    210  flex: 1;
    211  display: flex;
    212  overflow: hidden;
    213 }
    214 
    215 #inspector-breadcrumbs .breadcrumbs-widget-item {
    216  white-space: nowrap;
    217  flex-shrink: 0;
    218 }
    219 
    220 #inspector-rules-container,
    221 #inspector-sidebar-container {
    222  overflow: hidden;
    223  position: relative;
    224  height: 100%;
    225 }
    226 
    227 #inspector-rules-sidebar,
    228 #inspector-sidebar {
    229  position: absolute;
    230  top: 0;
    231  bottom: 0;
    232  left: 0;
    233  right: 0;
    234 }
    235 
    236 /* Override `-moz-user-focus:ignore;` from toolkit/content/xul.css */
    237 .inspector-tabpanel > * {
    238  -moz-user-focus: normal;
    239 }
    240 
    241 /* Markup Box */
    242 
    243 iframe {
    244  border: 0;
    245 }
    246 
    247 #markup-box {
    248  width: 100%;
    249  flex: 1;
    250  min-height: 0;
    251 }
    252 
    253 #markup-box > iframe {
    254  height: 100%;
    255  width: 100%;
    256 }
    257 
    258 /* Extension Sidebar */
    259 .inspector-tabpanel.extension-sidebar {
    260  height: 100%;
    261  overflow-y: auto;
    262 
    263  /* Prevent overflow issue (Bug 1905000) */
    264  iframe.inspector-extension-sidebar-page {
    265    display: block;
    266  }
    267 }
    268 
    269 /* Used for both the computed view and the rule view, to truncate extremely
    270 long base64 URLs and other unexpectedly long text properties. */
    271 .propertyvalue-long-text {
    272  /* Force inline-block to be able to set a max-width. */
    273  display: inline-block;
    274  /* Arbitrary max-width, this should allow the value to be inlined with the
    275     property name in very wide containers */
    276  max-width: 80%;
    277  /* Add ellipsis. */
    278  overflow: hidden;
    279  text-overflow: ellipsis;
    280  /* Introducing display: inline-block; shifts the vertical alignment, force to
    281     align it to the parent's text */
    282  vertical-align: text-top;
    283  /* Force the long text to be rendered on a single line. */
    284  white-space: nowrap;
    285 }
    286 
    287 /* Used for both the computed view and the rule view, to style element that we put
    288   at the same place as selectors but who aren't technically selectors, e.g. element
    289   style attribute and pres-hint styles */
    290 .alternative-selector {
    291  font-style: italic;
    292 }