tor-browser

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

tooltips.css (27451B)


      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 /* Import stylesheets for specific tooltip widgets */
      6 @import url(chrome://devtools/skin/accessibility-color-contrast.css);
      7 @import url(chrome://devtools/skin/badge.css);
      8 @import url(chrome://devtools/skin/inspector-shared.css);
      9 @import url(chrome://devtools/skin/variables.css);
     10 @import url(chrome://devtools/content/shared/widgets/cubic-bezier.css);
     11 @import url(chrome://devtools/content/shared/widgets/filter-widget.css);
     12 @import url(chrome://devtools/content/shared/widgets/linear-widget.css);
     13 @import url(chrome://devtools/content/shared/widgets/spectrum.css);
     14 /*
     15 * compatibility.css is primarily used by the Compatibility panel, so import it in a layer
     16 * to give it a lower importance than the rule here and mitigate styling mismatch.
     17 */
     18 @import url(chrome://devtools/skin/compatibility.css) layer(shared);
     19 
     20 /* The following properties values are consumed by the client for drawing in canvas
     21 * (e.g. for the CubicBezierWidget).
     22 * Since they're defined in :root with light-dark(), we need to register them so we'll get
     23 * the actual final (rgb) color, and not the declaration with substituted variables
     24 */
     25 @property --bezier-diagonal-color {
     26  syntax: "<color>";
     27  inherits: true;
     28  initial-value: transparent;
     29 }
     30 
     31 @property --timing-function-control-point-background {
     32  syntax: "<color>";
     33  inherits: true;
     34  initial-value: transparent;
     35 }
     36 
     37 :root {
     38  --theme-arrowpanel-border-radius: 3.5px;
     39 
     40  --bezier-diagonal-color: light-dark(rgba(0, 0, 0, 0.2), #eee);
     41  --timing-function-grid-color: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.1));
     42  --timing-function-line-color: #4c9ed9;
     43  --timing-function-preview-scale: light-dark(var(--grey-43), var(--grey-40));
     44  --timing-function-preview-dot-border: white;
     45  --timing-function-control-point-background: light-dark(var(--grey-55), var(--grey-20));
     46 
     47  /* Tooltips */
     48  --theme-tooltip-color: light-dark(var(--theme-body-color), var(--theme-text-color-strong));
     49  --theme-tooltip-background: light-dark(rgb(255, 255, 255), var(--theme-popup-background));
     50  --theme-tooltip-shadow-color: light-dark(var(--grey-90-a10), rgba(25, 25, 25, 0.76));
     51 
     52  /* Doorhangers */
     53  /* These colors are based on the colors used for doorhangers elsewhere in Firefox. */
     54  --theme-arrowpanel-background: var(--theme-popup-background);
     55  --theme-arrowpanel-color: var(--theme-popup-color);
     56  --theme-arrowpanel-border-color: var(--theme-popup-border-color);
     57  --theme-arrowpanel-separator: light-dark(ThreeDShadow, rgba(249, 249, 250, 0.1));
     58  --theme-arrowpanel-active-background: light-dark(hsla(0, 0%, 80%, 0.45), rgba(249, 249, 250, 0.15));
     59  --theme-arrowpanel-active-outline-color: transparent;
     60  --theme-arrowpanel-disabled-color: light-dark(GrayText, rgba(249, 249, 250, 0.5));
     61 
     62  &[forced-colors-active] {
     63    /* The active state have a different background but with an outline in HCM */
     64    --theme-arrowpanel-active-background: SelectedItem;
     65    --theme-arrowpanel-active-color: SelectedItemText;
     66    --theme-arrowpanel-active-outline-color: ButtonText;
     67 
     68    /* This is used in a repeated gradient to create a grid pattern.
     69       Using GrayText directly makes it hard to distinguish the
     70       other elements in the chart, so lower the color opacity a bit.
     71       It should be fine as it's not an important element. Also, this can
     72       work even if we don't have a resulting system color, as the
     73       consumers of this variable already need to opt out of forced colors
     74       so it can be used in the background gradient */
     75    /* prettier-ignore */
     76    --timing-function-grid-color: light-dark(
     77      /* In light mode, the grid appears much more contrasted, so lower the opacity even more */
     78      rgb(from GrayText r g b / 0.4),
     79      rgb(from GrayText r g b / 0.7)
     80    );
     81    --timing-function-line-color: var(--theme-highlight-blue);
     82    --timing-function-preview-dot-border: CanvasText;
     83    --timing-function-control-point-background: ButtonText;
     84    --bezier-diagonal-color: CanvasText;
     85  }
     86 }
     87 
     88 :root[platform="mac"].theme-light {
     89  --theme-arrowpanel-separator: hsla(210, 4%, 10%, 0.14);
     90 }
     91 
     92 /*
     93  There's a specific color-scheme defined for panels in https://searchfox.org/mozilla-central/rev/02841791400cf7cf5760c0cfaf31f5d772624253/toolkit/themes/shared/popup.css#9-13
     94  This could create issues when the Firefox theme is at odd with the DevTools one (e.g.
     95  if Firefox uses a dark theme but the user has a DevTools light theme.
     96  Unset the color-scheme on those element so it uses the one we set on :root in common.css,
     97  which matches our light/dark theme.
     98 */
     99 menupopup,
    100 panel {
    101  color-scheme: unset;
    102 }
    103 
    104 strong {
    105  font-weight: bold;
    106 }
    107 
    108 /* Tooltip: CSS variables tooltip */
    109 
    110 .tooltip-container:has(.devtools-tooltip-css-variable) {
    111  /* By default, in dark mode, the tooltip background color is lighter than the background
    112     color of the Rules view. Since we're using the same color than in the Rules view
    113     for CSS values, this can lead to poor contrast.
    114     To prevent this, we apply the same background color than in the Rules view */
    115  --theme-tooltip-background: var(--theme-body-background);
    116 }
    117 
    118 .devtools-tooltip-css-variable {
    119  --block-padding: 8px;
    120  color: var(--theme-body-color);
    121  padding: var(--block-padding) 8px;
    122  direction: ltr;
    123  overflow-wrap: break-word;
    124  /* Try to show the content of the tooltip on a single line */
    125  inline-size: max-content;
    126  min-inline-size: 60px;
    127  max-inline-size: min(500px, 100vw);
    128 
    129  /* If only the "top" section is displayed, to avoid smaller text (e.g. `10px`) to look unbalanced */
    130  .variable-value:not(:has(+ .variable-tooltip-section)) {
    131    text-align: center;
    132  }
    133  /* If there are other sections, add some space below the value */
    134  .variable-value:has(+ .variable-tooltip-section) {
    135    padding-block-end: var(--block-padding);
    136  }
    137 
    138  .variable-tooltip-section {
    139    border-block-start: 1px solid var(--theme-splitter-color);
    140    margin: 0;
    141    padding-block: var(--block-padding);
    142 
    143    h2 {
    144      margin-block: 0;
    145      padding-block-start: 0;
    146      padding-block-end: var(--block-padding);
    147    }
    148 
    149    dl {
    150      padding: 0;
    151      margin: 0;
    152    }
    153 
    154    dt,
    155    dd {
    156      display: inline;
    157    }
    158 
    159    dt {
    160      color: var(--theme-highlight-blue);
    161      padding-inline-end: 4px;
    162    }
    163 
    164    dd {
    165      color: var(--theme-highlight-red);
    166      margin: 0;
    167      padding: 0;
    168    }
    169  }
    170 }
    171 
    172 /* Tooltip: Compatibility tooltip */
    173 
    174 .devtools-tooltip-css-compatibility {
    175  color: var(--theme-body-color);
    176  padding: 2px;
    177  direction: ltr;
    178 }
    179 
    180 /* Tooltip: JS Evaluation Context */
    181 
    182 #webconsole-input-evaluationsButton > .tooltip-panel {
    183  /* helps the JS Context selector to have scrollbars when content exceed the vertical size of the popup */
    184  overflow-y: auto;
    185 }
    186 
    187 /* Tooltip: Inactive CSS tooltip */
    188 
    189 .devtools-tooltip-inactive-css,
    190 .devtools-tooltip-css-compatibility {
    191  color: var(--theme-arrowpanel-color);
    192  margin: 0;
    193  padding: 10px 14px 12px 14px;
    194  font-size: 12px;
    195 }
    196 
    197 .devtools-tooltip-inactive-css,
    198 .devtools-tooltip-css-compatibility,
    199 .devtools-tooltip-inactive-css strong,
    200 .devtools-tooltip-css-compatibility strong {
    201  user-select: text;
    202  -moz-user-focus: normal;
    203 }
    204 
    205 .devtools-tooltip-inactive-css p,
    206 .devtools-tooltip-css-compatibility p {
    207  margin-block-start: 0;
    208  margin-block-end: calc(1em - 4px);
    209 }
    210 
    211 .devtools-tooltip-inactive-css p:last-child,
    212 .devtools-tooltip-css-compatibility p:last-child {
    213  margin-block-end: 0;
    214 }
    215 
    216 .devtools-tooltip-inactive-css .link,
    217 .devtools-tooltip-css-compatibility .link {
    218  color: var(--theme-link-color);
    219  cursor: pointer;
    220 }
    221 
    222 /* Tooltip: Compatibility tooltip */
    223 
    224 .tooltip-container[type="doorhanger"] .tooltip-panel ul.compatibility-unsupported-browser-list {
    225  width: 100%;
    226  padding: 0;
    227  display: flex;
    228  justify-content: start;
    229 }
    230 
    231 /* Tooltip: query container info */
    232 .devtools-tooltip-query-container {
    233  color: var(--theme-arrowpanel-color);
    234  margin: 0;
    235  padding: 10px 14px 12px;
    236  font-size: 12px;
    237  user-select: text;
    238  -moz-user-focus: normal;
    239 }
    240 
    241 .devtools-tooltip-query-container header {
    242  --block-end-space: 5px;
    243  border-block-end: 1px solid var(--theme-popup-dimmed);
    244  padding-block-end: var(--block-end-space);
    245  margin-block-end: var(--block-end-space);
    246  max-width: 100%;
    247  text-overflow: ellipsis;
    248  overflow: hidden;
    249  color: var(--theme-body-color);
    250 }
    251 
    252 .devtools-tooltip-query-container ul {
    253  padding: 0;
    254  margin: 0;
    255  list-style: none;
    256 }
    257 
    258 .devtools-tooltip-query-container .objectBox-node .tag-name {
    259  color: var(--theme-highlight-blue);
    260 }
    261 
    262 .devtools-tooltip-query-container .objectBox-node .attribute-name {
    263  color: var(--theme-highlight-red);
    264 }
    265 
    266 .devtools-tooltip-query-container .property-name {
    267  color: var(--theme-highlight-blue);
    268 }
    269 
    270 .devtools-tooltip-query-container .property-value {
    271  color: var(--theme-highlight-red);
    272 }
    273 
    274 /* Tooltip: Tiles */
    275 
    276 .devtools-tooltip-tiles {
    277  background-color: #eee;
    278  background-image:
    279    linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc),
    280    linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc);
    281  background-size: 20px 20px;
    282  background-position:
    283    0 0,
    284    10px 10px;
    285 }
    286 
    287 .tooltip-container {
    288  display: none;
    289  position: fixed;
    290  z-index: 9999;
    291  background: transparent;
    292  pointer-events: none;
    293  overflow: clip;
    294  filter: drop-shadow(0 2px 8px var(--theme-tooltip-shadow-color));
    295 }
    296 
    297 .tooltip-xul-wrapper {
    298  /* All these are drawn by the tooltip-container, effectively */
    299  appearance: none;
    300  background: transparent;
    301  border: none;
    302  padding: 0;
    303  min-width: 1px;
    304  min-height: 1px;
    305  -moz-window-shadow: none;
    306  --panel-border-radius: 0px;
    307  --panel-padding: 0px;
    308  --panel-background: transparent;
    309  --panel-border-color: transparent;
    310  --panel-shadow: none;
    311 
    312  /* This is enough room for the shadow of the tooltip-container */
    313  --panel-shadow-margin: 10px;
    314 
    315  &::part(content) {
    316    border: none;
    317    /* Avoid clipping the drop-shadow */
    318    overflow: visible;
    319  }
    320 
    321  &.non-interactive-toggle {
    322    /* We need to make toggled-on-hover panels transparent to events, otherwise
    323     * hovering over the panel shadow would toggle the panel. */
    324    pointer-events: none;
    325  }
    326 
    327  /* The panel is absolutely positioned itself. */
    328  > .tooltip-container {
    329    position: relative;
    330  }
    331 }
    332 
    333 .tooltip-top {
    334  flex-direction: column;
    335 }
    336 
    337 .tooltip-bottom {
    338  flex-direction: column-reverse;
    339 }
    340 
    341 .tooltip-panel {
    342  background-color: var(--theme-tooltip-background);
    343  pointer-events: all;
    344  flex-grow: 1;
    345 }
    346 
    347 /* Adding the scrollbar in the RDM tooltip */
    348 #device-selector-menu .tooltip-panel {
    349  max-height: 500px;
    350 }
    351 
    352 #device-selector-menu .tooltip-panel > .checkbox-container {
    353  height: 100%;
    354  overflow-y: auto;
    355 }
    356 
    357 .tooltip-visible {
    358  display: flex;
    359 }
    360 
    361 .tooltip-hidden {
    362  display: flex;
    363  visibility: hidden;
    364 }
    365 
    366 /* Tooltip : flexible height styles */
    367 
    368 .tooltip-flexible-height .tooltip-panel {
    369  /* In flexible mode the tooltip panel should only grow according to its content. */
    370  flex-grow: 0;
    371 }
    372 
    373 .tooltip-flexible-height .tooltip-filler {
    374  /* In flexible mode the filler should grow as much as possible. */
    375  flex-grow: 1;
    376 }
    377 
    378 /* Tooltip : arrow style */
    379 
    380 .tooltip-container[type="arrow"] > .tooltip-panel {
    381  position: relative;
    382  min-height: 10px;
    383  box-sizing: border-box;
    384  width: 100%;
    385  border-radius: var(--theme-arrowpanel-border-radius);
    386 }
    387 
    388 .tooltip-top[type="arrow"] .tooltip-panel {
    389  top: 0;
    390 }
    391 
    392 .tooltip-bottom[type="arrow"] .tooltip-panel {
    393  bottom: 0;
    394 }
    395 
    396 .tooltip-arrow {
    397  position: relative;
    398  box-sizing: border-box;
    399  height: 16px;
    400  width: 32px;
    401  overflow: hidden;
    402  flex-shrink: 0;
    403 }
    404 
    405 /* In RTL locales and context, only use RTL on the tooltip content, keep LTR for positioning */
    406 .tooltip-container:-moz-locale-dir(rtl),
    407 .tooltip-container:dir(rtl) {
    408  direction: ltr;
    409 }
    410 
    411 .tooltip-panel:-moz-locale-dir(rtl),
    412 .tooltip-panel:dir(rtl) {
    413  direction: rtl;
    414 }
    415 
    416 .tooltip-top .tooltip-arrow {
    417  /**
    418   * The -1px margin is there to make sure the middle of the arrow overlaps with
    419   * the border of the tooltip container.
    420   * The -2px is there because the rotated arrow is not visually as tall as its
    421   * container. Since the positioning logic relies on measuring the size of the
    422   * tooltip, this -2px ensures the measured size matches the visuals (and not
    423   * simply the box model).
    424   */
    425  margin-bottom: -2px;
    426  margin-top: -1px;
    427 }
    428 
    429 .tooltip-bottom .tooltip-arrow {
    430  /* See comment in .tooltip-top .tooltip-arrow (inverted here) */
    431  margin-bottom: -1px;
    432  margin-top: -2px;
    433 }
    434 
    435 .tooltip-arrow::before {
    436  content: "";
    437  position: absolute;
    438  width: 21px;
    439  height: 21px;
    440  margin-left: 4px;
    441  background: var(--theme-tooltip-background);
    442  border: 0 none;
    443  pointer-events: all;
    444  box-sizing: border-box;
    445 }
    446 
    447 .tooltip-bottom .tooltip-arrow::before {
    448  margin-top: 5px;
    449  transform: rotate(225deg);
    450 }
    451 
    452 .tooltip-top .tooltip-arrow::before {
    453  margin-top: -12px;
    454  transform: rotate(45deg);
    455 }
    456 
    457 /* XUL panels have a default border, but pure HTML tooltips don't have one. */
    458 .tooltip-container[type="arrow"] > .tooltip-panel,
    459 .tooltip-container[type="arrow"] > .tooltip-arrow::before {
    460  border: 1px solid var(--theme-arrowpanel-border-color);
    461 }
    462 
    463 /* Tooltip : doorhanger style */
    464 
    465 .tooltip-container[type="doorhanger"] {
    466  > .tooltip-panel {
    467    color: var(--theme-arrowpanel-color);
    468    margin: 0;
    469    padding: 0;
    470    max-width: 320px;
    471  }
    472 
    473  > .tooltip-panel,
    474  > .tooltip-arrow::before {
    475    background: var(--theme-arrowpanel-background);
    476    border: 1px solid var(--theme-arrowpanel-border-color);
    477    border-radius: var(--theme-arrowpanel-border-radius);
    478    box-shadow: 0 0 4px hsla(210, 4%, 10%, 0.2);
    479  }
    480 
    481  > .tooltip-arrow {
    482    /* Desired width of the arrow */
    483    --arrow-width: 20px;
    484 
    485    /* Amount of room to allow for the shadow. Should be about half the radius. */
    486    --shadow-radius: 4px;
    487    --shadow-margin: calc(var(--shadow-radius) / 2);
    488 
    489    /*
    490     * Crop the arrow region to show half the arrow plus allow room for margins.
    491     *
    492     * The ARROW_WIDTH in HTMLTooltip.js needs to match the following value.
    493     */
    494    width: calc(var(--arrow-width) + 2 * var(--shadow-margin));
    495    height: calc(var(--arrow-width) / 2 + var(--shadow-margin));
    496 
    497    /**
    498     * The rotated box slightly overlaps the left edge of the arrow container.
    499     * This means the arrow is not centered in its own box by default.
    500     */
    501    padding-left: 1px;
    502 
    503    &::before {
    504      /* Don't inherit any rounded corners. */
    505      border-radius: 0;
    506 
    507      /*
    508       * When the box is rotated, it should have width <arrow-width>.
    509       * That makes the length of one side of the box equal to:
    510       *
    511       *    (<arrow-width> / 2) / sin 45
    512       */
    513      --sin-45: 0.707106781;
    514      --square-side: calc(var(--arrow-width) / 2 / var(--sin-45));
    515      width: var(--square-side);
    516      height: var(--square-side);
    517 
    518      /*
    519       * The rotated square will overshoot the left side
    520       * and need to be shifted in by:
    521       *
    522       *   (<arrow-width> - square side) / 2
    523       *
    524       * But we also want to shift it in so that the box-shadow
    525       * is not clipped when we clip the parent so we add
    526       * a suitable margin for that.
    527       */
    528      --overhang: calc((var(--arrow-width) - var(--square-side)) / 2);
    529      margin-left: calc(var(--overhang) + var(--shadow-margin));
    530    }
    531  }
    532 
    533  &.tooltip-top > .tooltip-arrow {
    534    /* Overlap the arrow with the 1px border of the doorhanger */
    535    margin-top: -1px;
    536 
    537    &::before {
    538      /* Show only the bottom half of the box */
    539      margin-top: calc(var(--square-side) / -2);
    540    }
    541  }
    542 
    543  &.tooltip-bottom > .tooltip-arrow {
    544    /* Overlap the arrow with the 1px border of the doorhanger */
    545    margin-bottom: -1px;
    546 
    547    &::before {
    548      /* Shift the rotated box in so that it is not clipped */
    549      margin-top: calc(var(--overhang) + var(--shadow-margin));
    550    }
    551  }
    552 
    553  .menu-standard-padding {
    554    margin: 0;
    555    padding: 6px 0;
    556  }
    557 
    558  .tooltip-panel ul {
    559    /* Override the display: flex declaration in xul.css
    560     * or else menu items won't stack. */
    561    display: block;
    562    list-style: none;
    563  }
    564 
    565  .tooltip-panel li {
    566    list-style: none;
    567  }
    568 
    569  .menuitem > .command {
    570    display: flex;
    571    align-items: baseline;
    572    margin: 0;
    573    padding: 4px 12px;
    574    /*
    575     * It doesn't really make sense, since if this is just about making the items
    576     * easier to click we should be using min-width instead.
    577     */
    578    margin-inline-end: 15px;
    579 
    580    &:focus-visible {
    581      --theme-outline-offset: -2px;
    582    }
    583 
    584    &:not([disabled], [open], :active):hover {
    585      background-color: var(--theme-popup-hover-background);
    586      color: var(--theme-popup-hover-color);
    587    }
    588 
    589    &:not([disabled]):is([open], :hover:active) {
    590      background-color: var(--theme-arrowpanel-active-background);
    591      color: var(--theme-arrowpanel-active-color);
    592      box-shadow: 0 1px 0 hsla(210, 4%, 10%, 0.03) inset;
    593      outline: 1px solid var(--theme-arrowpanel-active-outline-color);
    594    }
    595 
    596    &[disabled] {
    597      color: var(--theme-text-color-inactive);
    598    }
    599 
    600    &[aria-checked="true"] {
    601      list-style-image: none;
    602      -moz-context-properties: fill;
    603      fill: currentColor;
    604      background: url(chrome://devtools/skin/images/check.svg) no-repeat transparent;
    605      background-position: 7px center;
    606 
    607      &:dir(rtl),
    608      &:-moz-locale-dir(rtl) {
    609        background-position-x: right 7px;
    610      }
    611    }
    612 
    613    > .label {
    614      flex: 1;
    615      font: menu;
    616      white-space: nowrap;
    617      text-overflow: ellipsis;
    618      overflow: hidden;
    619    }
    620 
    621    > .accelerator {
    622      margin-inline-start: 10px;
    623      color: var(--theme-arrowpanel-disabled-color);
    624      font: message-box;
    625    }
    626  }
    627 
    628  /* Use :where to avoid having a high specificity that would take over the rule above */
    629  .menuitem > button.command:where([role="menuitem"], [role="menuitemcheckbox"], [role="link"]) {
    630    appearance: none;
    631    border: none;
    632    background-color: transparent;
    633    text-align: start;
    634    width: 100%;
    635 
    636    &:not([disabled]) {
    637      color: var(--theme-arrowpanel-color);
    638    }
    639  }
    640 
    641  .checkbox-container .menuitem > .command > .label {
    642    padding-inline-start: 16px;
    643  }
    644 
    645  hr {
    646    display: block;
    647    border: none;
    648    border-top: 1px solid var(--theme-arrowpanel-separator);
    649    margin: 6px 0;
    650    padding: 0;
    651  }
    652 
    653  [role="menuseparator"] {
    654    border: none;
    655    border-bottom: 1px solid #cacdd3;
    656    width: 100%;
    657    height: 2px;
    658    display: block;
    659    background: none;
    660    pointer-events: none;
    661  }
    662 }
    663 
    664 .menu-button--iconic::before,
    665 .tooltip-container[type="doorhanger"] .menuitem > .command.iconic > .label::before {
    666  content: " ";
    667  display: inline-block;
    668  margin-inline-end: 8px;
    669  width: 16px;
    670  height: 16px;
    671  /* Better optical alignment than with 'vertical-align: middle'.
    672     Works well with font sizes between 12px and 16px. */
    673  vertical-align: -3px;
    674  -moz-context-properties: fill;
    675  fill: currentColor;
    676  background-image: var(--menuitem-icon-image);
    677  background-size: contain;
    678  background-repeat: no-repeat;
    679  /*
    680   * The icons in the sidebar menu have opacity: 0.8 here, but those in the
    681   * hamburger menu don't. For now we match the hamburger menu styling,
    682   * especially because the 80% opacity makes the icons look dull in dark mode.
    683   */
    684 }
    685 
    686 /* Tooltip: Events */
    687 
    688 .devtools-tooltip-events-container {
    689  border-radius: var(--theme-arrowpanel-border-radius);
    690  height: 100%;
    691  overflow-y: auto;
    692  margin: 0;
    693  padding: 0;
    694 }
    695 
    696 @media (-moz-overlay-scrollbars) {
    697  .devtools-tooltip-events-container {
    698    padding-inline: calc(env(scrollbar-inline-size) / 2);
    699  }
    700 }
    701 
    702 .devtools-tooltip-events-container .event-header {
    703  display: flex;
    704  align-items: center;
    705  box-sizing: content-box;
    706  height: 24px;
    707  padding: 0 4px;
    708  cursor: pointer;
    709  overflow: hidden;
    710  color: var(--theme-tooltip-color);
    711  background-color: var(--theme-tooltip-background);
    712 }
    713 
    714 .devtools-tooltip-events-container > li + li .event-header {
    715  border-top: 1px solid var(--theme-splitter-color);
    716 }
    717 
    718 .event-header .theme-twisty {
    719  flex: none;
    720  width: 12px;
    721  height: 12px;
    722  margin-inline-end: 4px;
    723  fill: currentColor;
    724  border: none;
    725  background-color: transparent;
    726 }
    727 
    728 .event-header .theme-twisty[aria-expanded="true"] {
    729  transform: none;
    730 }
    731 
    732 .event-tooltip-listener-toggle-checkbox {
    733  flex-shrink: 0;
    734 }
    735 
    736 .event-tooltip-debugger-icon {
    737  -moz-context-properties: stroke;
    738  stroke: var(--theme-icon-color);
    739  background-image: url("chrome://devtools/content/shared/components/reps/images/jump-definition.svg");
    740  background-repeat: no-repeat;
    741  background-position: center;
    742  background-color: transparent;
    743  border: none;
    744  width: 20px;
    745  height: 20px;
    746  border-radius: 2px;
    747  margin-inline-end: 4px;
    748  flex-shrink: 0;
    749  cursor: pointer;
    750 }
    751 
    752 .event-tooltip-debugger-icon:hover {
    753  background-color: var(--toolbarbutton-hover-background);
    754 }
    755 
    756 .event-tooltip-event-type,
    757 .event-tooltip-filename,
    758 .event-tooltip-attributes {
    759  margin-inline-start: 0;
    760  flex-shrink: 0;
    761  cursor: pointer;
    762 }
    763 
    764 .event-tooltip-event-type {
    765  font-weight: bold;
    766  font-size: 12px;
    767  line-height: 16px;
    768 }
    769 
    770 .event-tooltip-filename {
    771  margin: 0 5px;
    772  font-size: 100%;
    773  flex-shrink: 1;
    774  white-space: nowrap;
    775  overflow: hidden;
    776  text-overflow: ellipsis;
    777  /* Force ellipsis to be displayed on the left */
    778  direction: rtl;
    779 }
    780 
    781 .event-tooltip-content-box {
    782  display: none;
    783  height: 100px;
    784  overflow: hidden;
    785  margin-inline-end: 0;
    786  border: 1px solid var(--theme-splitter-color);
    787  border-width: 1px 0 0 0;
    788 }
    789 
    790 .event-toolbox-content-box iframe {
    791  height: 100%;
    792  border-style: none;
    793 }
    794 
    795 .event-tooltip-content-box[open] {
    796  display: block;
    797 }
    798 
    799 .event-tooltip-source-container {
    800  margin-top: 5px;
    801  margin-bottom: 10px;
    802  margin-inline-start: 5px;
    803  margin-inline-end: 0;
    804 }
    805 
    806 .event-tooltip-source {
    807  margin-bottom: 0;
    808 }
    809 
    810 .event-tooltip-attributes-container {
    811  display: flex;
    812  flex-shrink: 0;
    813  flex-grow: 1;
    814  justify-content: flex-end;
    815 }
    816 
    817 .event-tooltip-attributes-box {
    818  display: flex;
    819  flex-shrink: 0;
    820  align-items: center;
    821  height: 14px;
    822  border-radius: 3px;
    823  padding: 1px 3px;
    824  margin-inline-start: 4px;
    825  background-color: var(--theme-text-color-alt);
    826  color: var(--theme-body-background);
    827 }
    828 
    829 .event-tooltip-attributes {
    830  margin: 0;
    831  font-size: 9px;
    832  line-height: 14px;
    833  max-width: 20ch;
    834  text-overflow: ellipsis;
    835  overflow-x: hidden;
    836  white-space: nowrap;
    837 }
    838 
    839 .event-tooltip-editor-frame {
    840  border-style: none;
    841  height: 100%;
    842  width: 100%;
    843 }
    844 
    845 /* Tooltip: HTML Search */
    846 
    847 #searchbox-panel-listbox {
    848  width: 250px;
    849  max-width: 250px;
    850  overflow-x: hidden;
    851 }
    852 
    853 #searchbox-panel-listbox .autocomplete-item,
    854 #searchbox-panel-listbox .autocomplete-item[selected] {
    855  overflow-x: hidden;
    856 }
    857 
    858 /* Tooltip: Image tooltip */
    859 
    860 /*
    861 * Overview of the Image Tooltip layout.
    862 *
    863 * ┌─────────────────────────────────────────┐
    864 * │ .devtools-tooltip-image-container       │
    865 * │ ┌─────────────────────────────────────┐ │
    866 * │ │ .devtools-tooltip-image-wrapper     │ │
    867 * │ │ ┌─────────────────────────────────┐ │ │
    868 * │ │ │ .devtools-tooltip-image         │ │ │
    869 * │ │ │ (the actual image tag)          │ │ │
    870 * │ │ └─────────────────────────────────┘ │ │
    871 * │ └─────────────────────────────────────┘ │
    872 * │ ┌─────────────────────────────────────┐ │
    873 * │ │ .devtools-tooltip-image-dimensions  │ │
    874 * │ └─────────────────────────────────────┘ │
    875 * └─────────────────────────────────────────┘
    876 *
    877 */
    878 
    879 .devtools-tooltip-image-container {
    880  /* Saved as variables to be synchronized easily with ImageTooltipHelper.js */
    881  --image-tooltip-image-padding: 4px;
    882  --image-tooltip-label-height: 20px;
    883 
    884  display: flex;
    885  flex-direction: column;
    886  height: 100%;
    887  min-width: 100px;
    888  text-align: center;
    889 }
    890 
    891 .devtools-tooltip-image-wrapper {
    892  align-items: center;
    893  display: flex;
    894  flex: 1;
    895  padding: var(--image-tooltip-image-padding);
    896  justify-content: center;
    897  min-height: 1px;
    898 }
    899 
    900 .devtools-tooltip-image {
    901  max-height: 100%;
    902 }
    903 
    904 .devtools-tooltip-image-dimensions {
    905  height: var(--image-tooltip-label-height);
    906  text-align: center;
    907 }
    908 
    909 .devtools-tooltip-image-broken {
    910  box-sizing: border-box;
    911  height: 100%;
    912  padding: 7px;
    913 }
    914 
    915 /* Tooltip: Invoke getter confirm Tooltip */
    916 
    917 .invoke-confirm {
    918  color: var(--theme-popup-color);
    919  border: 1px solid rgba(0, 0, 0, 0.1);
    920  max-width: 212px;
    921 }
    922 
    923 .invoke-confirm .close-confirm-dialog-button::before {
    924  background-image: url("chrome://devtools/skin/images/close.svg");
    925 }
    926 
    927 .invoke-confirm .confirm-label {
    928  margin: 0;
    929  padding: 4px;
    930  background-color: var(--theme-toolbar-background-alt);
    931  display: flex;
    932  align-items: start;
    933 }
    934 
    935 .invoke-confirm .confirm-label p {
    936  margin: 0;
    937  padding: 0;
    938  flex-grow: 1;
    939  hyphens: auto;
    940 }
    941 
    942 .invoke-confirm .emphasized {
    943  font-family: var(--monospace-font-family);
    944  font-weight: bold;
    945  overflow-wrap: break-word;
    946 }
    947 
    948 .invoke-confirm .close-confirm-dialog-button {
    949  padding: 0;
    950  margin: 0;
    951  flex-grow: 0;
    952 }
    953 
    954 .invoke-confirm .confirm-button {
    955  background-color: var(--theme-selection-background);
    956  color: white;
    957  border: none;
    958  padding: 6px;
    959  display: block;
    960  width: 100%;
    961  text-align: left;
    962 }
    963 
    964 /* The button already has a "selected" style, we can remove the focus rings. */
    965 .confirm-button:focus-visible {
    966  outline: none;
    967 }
    968 
    969 .invoke-confirm .learn-more-link {
    970  color: var(--theme-link-color);
    971  padding-inline-end: 4px;
    972  display: flex;
    973  align-items: center;
    974  justify-content: end;
    975  min-height: 20px;
    976  cursor: pointer;
    977 }
    978 
    979 .invoke-confirm .learn-more-link::after {
    980  content: "";
    981  width: 14px;
    982  height: 14px;
    983  fill: currentColor;
    984  -moz-context-properties: fill;
    985  background-image: url(chrome://devtools/skin/images/help.svg);
    986  background-size: contain;
    987  background-repeat: no-repeat;
    988  margin-inline-start: 4px;
    989 }
    990 
    991 /* Tooltip: Rule Preview */
    992 
    993 .rule-preview-tooltip-container {
    994  display: flex;
    995  flex-direction: column;
    996  max-width: 200px;
    997  color: var(--theme-body-color);
    998  padding: 5px;
    999 }
   1000 
   1001 .rule-preview-tooltip-message {
   1002  white-space: pre-wrap;
   1003 }
   1004 
   1005 .rule-preview-tooltip-source-rule-footer {
   1006  align-self: center;
   1007  border-top: 1px solid var(--theme-body-color);
   1008  margin-top: 5px;
   1009  margin-right: 5px;
   1010  margin-left: 5px;
   1011  padding: 3px;
   1012 }
   1013 
   1014 /* Tooltip: Selector warning */
   1015 .devtools-tooltip-selector-warnings {
   1016  margin: 0;
   1017  padding: 10px;
   1018  list-style: none;
   1019 
   1020  & > li {
   1021    padding: 0;
   1022 
   1023    & + li {
   1024      border-block-start: 1px solid var(--theme-splitter-color);
   1025    }
   1026  }
   1027 }
   1028 
   1029 /* Indent the content script items */
   1030 .webconsole-evaluation-selector-item.indented::before {
   1031  content: "\2514\2500" !important;
   1032  z-index: 1000;
   1033  margin-inline-start: 20px;
   1034 }
   1035 .checkbox-container .menuitem > .command.indented > .label {
   1036  padding-inline-start: 4px;
   1037 }