tor-browser

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

Accordion.css (2650B)


      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 .accordion {
      6  background-color: var(--theme-sidebar-background);
      7  width: 100%;
      8  list-style-type: none;
      9  padding: 0;
     10  margin-top: 0;
     11 }
     12 
     13 .accordion ._header {
     14  --dbg-accordion-twisty-color: var(--theme-icon-dimmed-color);
     15  background-color: var(--theme-accordion-header-background);
     16  border-bottom: 1px solid var(--theme-splitter-color);
     17  display: flex;
     18  column-gap: 8px;
     19  font-size: 12px;
     20  line-height: calc(16 / 12);
     21  padding: 4px 6px;
     22  width: 100%;
     23  align-items: center;
     24  margin: 0;
     25  font-weight: normal;
     26  cursor: default;
     27  user-select: none;
     28 }
     29 
     30 .accordion ._header:hover {
     31  background-color: var(--theme-accordion-header-hover-background);
     32 
     33  :root[forced-colors-active] & {
     34    --dbg-accordion-twisty-color: var(--theme-accordion-header-hover-color);
     35  }
     36 }
     37 
     38 .accordion ._header .header-label {
     39  flex-grow: 1;
     40  white-space: nowrap;
     41  overflow: hidden;
     42  text-overflow: ellipsis;
     43  color: var(--theme-accordion-header-color);
     44  background: transparent;
     45  padding: 0;
     46 
     47  /* align expand arrow and button text */
     48  display: flex;
     49  align-items: center;
     50  gap: 4px;
     51 
     52  &:hover {
     53    background: transparent;
     54    color: var(--theme-accordion-header-hover-color);
     55  }
     56 
     57  /* The expand arrow needs to be displayed inside the button to be accessible */
     58  &::before {
     59    content: "";
     60    display: inline-block;
     61    width: 10px;
     62    height: 10px;
     63    flex-shrink: 0;
     64    background-image: url(chrome://devtools/content/debugger/images/arrow.svg);
     65    background-repeat: no-repeat;
     66    background-size: contain;
     67    -moz-context-properties: fill;
     68    fill: var(--dbg-accordion-twisty-color);
     69    rotate: -90deg;
     70    transition: rotate 180ms var(--animation-curve);
     71  }
     72  &:dir(rtl)::before {
     73    rotate: 90deg;
     74  }
     75 
     76  &[aria-expanded="true"]::before {
     77    /* icon should always point to the bottom (default) when expanded,
     78    regardless of the text direction */
     79    rotate: 0deg !important;
     80  }
     81 }
     82 
     83 .accordion ._header .header-buttons {
     84  display: flex;
     85  margin-inline-start: auto;
     86 }
     87 
     88 .accordion ._header .header-buttons button {
     89  color: var(--theme-body-color);
     90  border: none;
     91  background: none;
     92  padding: 0;
     93  margin: 0 2px;
     94  width: 16px;
     95  height: 16px;
     96 }
     97 
     98 .accordion ._header .header-buttons button .dbg-img {
     99  display: block;
    100 }
    101 
    102 .accordion ._content {
    103  border-bottom: 1px solid var(--theme-splitter-color);
    104  font-size: var(--theme-body-font-size);
    105 }
    106 
    107 .accordion div:last-child ._content {
    108  border-bottom: none;
    109 }