tor-browser

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

computed.css (5933B)


      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 .theme-dark {
      6  --row-striped-background: rgba(255, 255, 255, 0.05);
      7 }
      8 
      9 .theme-light {
     10  --row-striped-background: rgba(247, 247, 247, 0.8);
     11 }
     12 
     13 #sidebar-panel-computedview {
     14  margin: 0;
     15  display: flex;
     16  flex-direction: column;
     17  width: 100%;
     18  height: 100%;
     19 }
     20 
     21 /* Reset the global rotation of the icon done for RTL layout.
     22   Computed view is always LTR */
     23 #sidebar-panel-computedview .theme-twisty:not(.open):dir(rtl),
     24 #sidebar-panel-computedview .theme-twisty:not([open]):-moz-locale-dir(rtl) {
     25  transform: rotate(-90deg);
     26 }
     27 
     28 #computedview-panel .inspector-tabpanel {
     29  min-width: 0;
     30 }
     31 
     32 #computedview-panel #browser-style-checkbox-label {
     33  overflow: hidden;
     34  text-overflow: ellipsis;
     35 }
     36 
     37 #computed-container {
     38  overflow: auto;
     39  height: 100%;
     40 }
     41 
     42 /* This extra wrapper only serves as a way to get the content of the view focusable.
     43   So that when the user reaches it either via keyboard or mouse, we know that the view
     44   is focused and therefore can handle shortcuts.
     45   However, for accessibility reasons, tabindex is set to -1 to avoid having to tab
     46   through it, and the outline is hidden. */
     47 #computed-container-focusable {
     48  height: 100%;
     49  outline: none;
     50 }
     51 
     52 #computed-toolbar {
     53  display: flex;
     54  align-items: center;
     55  user-select: none;
     56 }
     57 
     58 #browser-style-checkbox {
     59  /* Bug 1200073 - extra space before the browser styles checkbox so
     60     they aren't squished together in a small window. Put also
     61     an extra space after. */
     62  margin-inline-start: 5px;
     63  margin-inline-end: 0;
     64 }
     65 
     66 #browser-style-checkbox-label {
     67  white-space: nowrap;
     68  padding-inline-start: 5px;
     69  margin-inline-end: 5px;
     70 }
     71 
     72 #computed-property-container {
     73  user-select: text;
     74  overflow-y: auto;
     75  overflow-x: hidden;
     76  list-style: none;
     77  margin: 0;
     78  padding: 0;
     79  /* Ajust outline to make it visible, otherwise it could be clipped, as the container takes the whole window size */
     80  outline-offset: -2px;
     81 }
     82 
     83 #computed-property-container > :nth-child(2n of .computed-property-view) {
     84  background: var(--row-striped-background);
     85 }
     86 
     87 .computed-property-hidden {
     88  display: none;
     89 }
     90 
     91 .computed-property-view {
     92  padding: 2px 0;
     93  padding-inline-start: 5px;
     94  display: flex;
     95  flex-wrap: wrap;
     96  /* Ajust outline to make it visible as the list items take the the whole window width */
     97  outline-offset: -2px;
     98 }
     99 
    100 .computed-property-name-container {
    101  width: 230px;
    102 }
    103 
    104 .computed-property-value-container {
    105  display: flex;
    106  flex: 1 1 168px;
    107  overflow: hidden;
    108 }
    109 
    110 .computed-property-name-container > *,
    111 .computed-property-value-container > * {
    112  display: inline-block;
    113  vertical-align: middle;
    114 }
    115 
    116 .computed-property-name {
    117  outline: 0 !important;
    118 }
    119 
    120 .computed-other-property-selector {
    121  color: var(--theme-body-color);
    122 }
    123 
    124 .computed-other-property-value::before {
    125  content: "";
    126  display: inline-block;
    127  vertical-align: -0.5px;
    128  width: 8px;
    129  height: 8px;
    130  margin: 0 1px;
    131  background-image: url(images/arrow-e.svg);
    132  background-repeat: no-repeat;
    133  background-size: contain;
    134  -moz-context-properties: fill;
    135  fill: var(--theme-icon-dimmed-color);
    136 }
    137 
    138 .computed-other-property-value:dir(rtl)::before {
    139  transform: scaleX(-1);
    140 }
    141 
    142 .computed-property-value {
    143  padding-inline-start: 14px;
    144  outline: 0 !important;
    145 }
    146 
    147 .invalid-at-computed-value-time-warning {
    148  display: inline-block;
    149  width: 12px;
    150  height: 12px;
    151  vertical-align: middle;
    152  margin-inline-start: 4px;
    153  background-size: contain;
    154  background-repeat: no-repeat;
    155  -moz-context-properties: fill;
    156  background-image: var(--invalid-at-computed-value-time-icon);
    157  fill: var(--invalid-at-computed-value-time-fill-color);
    158 
    159  &[hidden] {
    160    display: none;
    161  }
    162 }
    163 
    164 .matchedselectors {
    165  width: 100%;
    166  padding-inline-start: 12px;
    167 
    168  /*
    169   * Matched selectors element is always created, but is empty until the arrow is expanded.
    170   * We only want the margin to appear when the matched selectors are visible.
    171   */
    172  &:not(:empty) {
    173    margin-block-start: 4px;
    174  }
    175 }
    176 
    177 /* Bug 1360238 - getSelection displays an extra "\n" on multiple sibling block elements.
    178   We rely on this behavior to add an extra "\n" between matched selectors (Bug 1222737).
    179   Therefore we use <div> elements around matched selectors and need this class
    180   to keep them inline. We do that to avoid doing any formatting logic in JS.
    181   Once Bug 1360238 will be fixed, we'll probably have to change the behavior
    182   and remove this class. */
    183 .fix-get-selection {
    184  display: inline;
    185 }
    186 
    187 .visually-hidden {
    188  clip: rect(1px, 1px, 1px, 1px);
    189  clip-path: inset(50%);
    190  height: 1px;
    191  width: 1px;
    192  margin: -1px;
    193  overflow: hidden;
    194  padding: 0;
    195  position: absolute;
    196 }
    197 
    198 /* From skin */
    199 .computed-expander {
    200  visibility: hidden;
    201 }
    202 
    203 .computed-expandable {
    204  visibility: visible;
    205 }
    206 
    207 .match {
    208  visibility: hidden;
    209 }
    210 
    211 .matchedselectors > p {
    212  clear: both;
    213  margin: 0;
    214  margin-inline-end: 2px;
    215  padding: 2px;
    216  overflow-x: hidden;
    217  border-style: dotted;
    218  border-color: var(--theme-splitter-color);
    219  border-width: 1px 1px 0 1px;
    220 
    221  /* Make the border more visible in High Contrast Mode */
    222  :root[forced-colors-active] & {
    223    border-style: solid;
    224  }
    225 }
    226 
    227 .matchedselectors > p:last-of-type {
    228  border-bottom-width: 1px;
    229 }
    230 
    231 .rule-text.matched {
    232  text-decoration: line-through;
    233 }
    234 
    235 #computed-no-results {
    236  height: 100%;
    237 }
    238 
    239 .onlyuserstyles {
    240  cursor: pointer;
    241 }
    242 
    243 .legendKey {
    244  margin: 0 5px;
    245 }
    246 
    247 .computed-link {
    248  padding: 0 3px;
    249  cursor: pointer;
    250  float: inline-end;
    251  color: var(--theme-internal-link-color);
    252 }
    253 
    254 /* Take away these two :visited rules to get a core dumper     */
    255 /* See https://bugzilla.mozilla.org/show_bug.cgi?id=575675#c30 */
    256 
    257 .computed-link {
    258  text-decoration: underline;
    259  text-decoration-skip-ink: none;
    260 }
    261 
    262 .computed-property-value .inspector-colorswatch {
    263  --swatch-size: 0.9em;
    264 }