tor-browser

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

Sources.css (5050B)


      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 .sources-panel {
      6  background-color: var(--theme-sidebar-background);
      7  display: flex;
      8  flex: 1;
      9  flex-direction: column;
     10  overflow: hidden;
     11  position: relative;
     12 
     13  & * {
     14    user-select: none;
     15  }
     16 
     17  /* Tabs header */
     18  & .tabs-navigation {
     19    height: var(--editor-header-height) !important;
     20 
     21    & .tabs-menu {
     22      /* override margin set by the Tabs component */
     23      margin: 0 !important;
     24    }
     25 
     26    & .tab {
     27      flex: 1;
     28      overflow: hidden;
     29      display: inline-flex;
     30      align-items: center;
     31    }
     32 
     33    & [role="tab"] {
     34      padding: 4px 8px;
     35      flex: 1;
     36    }
     37  }
     38 }
     39 
     40 
     41 
     42 /***********************/
     43 /* Souces Panel layout */
     44 /***********************/
     45 
     46 .sources-list {
     47  display: flex;
     48  flex-direction: column;
     49  height: 100%;
     50  overflow: hidden;
     51  position: relative;
     52 }
     53 
     54 .sources-list .debugger-settings-menu-button {
     55  position: absolute;
     56  top: 0;
     57 
     58  inset-inline-end: 1px;
     59  /* The negative margin is set in order to collapse the inline-end border with
     60     the border of its container. */
     61  margin-inline-end: -1px;
     62  html[dir="rtl"] & {
     63    /* In RTL mode, there is a slightly different offset, so even if we use
     64       inline-end, we have to set slightly different values. */
     65    inset-inline-end: -1px;
     66    margin-inline-end: 0;
     67  }
     68 
     69  z-index: 5;
     70 
     71  background: var(--theme-toolbar-background);
     72  min-width: unset;
     73  width: 25px;
     74  height: 25px;
     75  border: 1px solid var(--theme-splitter-color);
     76  border-top-width: 0;
     77 }
     78 
     79 .sources-list.sources-list-has-overflow:not(.sources-list-custom-root)
     80  .debugger-settings-menu-button {
     81  inset-inline-end: 15px;
     82  html[dir="rtl"] & {
     83    inset-inline-end: 14px;
     84  }
     85 }
     86 
     87 .sources-list .sources-clear-root-container {
     88  grid-area: custom-root;
     89 }
     90 
     91 .sources-list :is(.tree, .no-sources-message) {
     92  grid-area: sources-tree-or-empty-message;
     93 }
     94 
     95 /****************/
     96 /*  Custom root */
     97 /****************/
     98 
     99 .sources-clear-root-container {
    100  width: 100%;
    101  text-align: start;
    102  white-space: nowrap;
    103  color: inherit;
    104  display: flex;
    105  border-bottom: 1px solid var(--theme-splitter-color);
    106 }
    107 
    108 .sources-clear-root {
    109  width: 24px;
    110  height: 24px;
    111  padding: 4px;
    112  outline-offset: -2px;
    113 }
    114 
    115 .sources-clear-root-container .devtools-separator {
    116  height: 20px;
    117  margin: 2px 4px;
    118 }
    119 
    120 .sources-clear-root-label {
    121  width: 100%;
    122  padding: 4px;
    123  line-height: 16px;
    124 }
    125 
    126 /*****************/
    127 /*  Sources tree */
    128 /*****************/
    129 
    130 .sources-list .tree {
    131  flex-grow: 1;
    132  padding: 4px 0;
    133  user-select: none;
    134 
    135  white-space: nowrap;
    136  overflow: auto;
    137  min-width: 100%;
    138 
    139  display: grid;
    140  grid-template-columns: 1fr;
    141  align-content: start;
    142 
    143  line-height: 1.4em;
    144 }
    145 
    146 .sources-list .tree .node {
    147  display: flex;
    148  align-items: center;
    149  width: 100%;
    150  padding-block: 8px;
    151  padding-inline: 6px 8px;
    152 }
    153 
    154 .sources-list .tree .node {
    155  padding: 2px 3px;
    156  position: relative;
    157 }
    158 
    159 
    160 html:not([dir="rtl"]) .sources-list .tree .node > div {
    161  margin-left: 10px;
    162 }
    163 
    164 html[dir="rtl"] .sources-list .tree .node > div {
    165  margin-right: 10px;
    166 }
    167 
    168 .sources-list .dbg-img {
    169  margin-inline-end: 4px;
    170 }
    171 
    172 .sources-list .tree .label .suffix {
    173  font-style: italic;
    174  font-size: 0.9em;
    175  color: var(--theme-comment);
    176 }
    177 
    178 .sources-list .tree .tree-node.focused {
    179  /* Make folder/file icons white on dark focused background */
    180  .dbg-img {
    181    background-color: var(--theme-selection-color);
    182    fill: var(--theme-selection-color);
    183  }
    184 }
    185 
    186 .sources-list .tree .focused .label .suffix {
    187  color: inherit;
    188 }
    189 
    190 .sources-list .tree .tree-node:not(.focused) .blackboxed {
    191  color: #806414;
    192 }
    193 
    194 .sources-list .dbg-img.dbg-img-blackBox {
    195  mask-size: 13px;
    196  background-color: #806414;
    197 }
    198 
    199 .sources-list .tree .label {
    200  display: inline-block;
    201  line-height: 16px;
    202 }
    203 
    204 .source-list-footer {
    205  display: flex;
    206  flex-wrap: wrap;
    207  align-items: center;
    208  gap: 5px;
    209  justify-content: center;
    210  text-align: center;
    211  min-height: var(--editor-footer-height);
    212  flex-shrink: 0;
    213  border-block-start: 1px solid var(--theme-warning-border);
    214  user-select: none;
    215  padding: 3px 10px;
    216  color: var(--theme-warning-color);
    217  background-color: var(--theme-warning-background);
    218 }
    219 
    220 .source-list-footer .devtools-togglebutton {
    221  background-color: var(--theme-toolbar-hover);
    222 }
    223 
    224 .source-list-footer .devtools-togglebutton:hover {
    225  background-color: var(--theme-toolbar-hover);
    226  cursor: pointer;
    227 }
    228 
    229 
    230 /* Removes start margin when a custom root is used */
    231 .sources-list-custom-root
    232  .tree
    233  > .tree-node[data-expandable="false"][aria-level="0"] {
    234  padding-inline-start: 4px;
    235 }
    236 
    237 .sources-list .tree-node[data-expandable="false"] .tree-indent:last-of-type {
    238  margin-inline-end: 0;
    239 }
    240 
    241 
    242 /*****************/
    243 /*   No Sources  */
    244 /*****************/
    245 
    246 .no-sources-message {
    247  display: flex;
    248  justify-content: center;
    249  align-items: center;
    250  font-style: italic;
    251  text-align: center;
    252  padding: 0.5em;
    253  font-size: 12px;
    254  user-select: none;
    255 }