summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/src/components/shared/Accordion.css
blob: d970527014ce6323fc3fc1438b4d1f318835a04a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */

.accordion {
  background-color: var(--theme-sidebar-background);
  width: 100%;
  list-style-type: none;
  padding: 0px;
  margin-top: 0px;
}

.accordion ._header {
  background-color: var(--theme-accordion-header-background);
  border-bottom: 1px solid var(--theme-splitter-color);
  display: flex;
  column-gap: 8px;
  font-size: 12px;
  line-height: calc(16 / 12);
  padding: 4px 6px;
  width: 100%;
  align-items: center;
  margin: 0px;
  font-weight: normal;
  cursor: default;
  user-select: none;
}

.accordion ._header:hover {
  background-color: var(--theme-accordion-header-hover);
}


.accordion ._header .header-label {
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--theme-toolbar-color);
  background: transparent;
  padding: 0;

  /* align expand arrow and button text */
  display: flex;
  align-items: center;
  gap: 4px;

  &:hover {
    background: transparent;
  }

  /* The expand arrow needs to be displayed inside the button to be accessible */
  &::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    background-image: url(chrome://devtools/content/debugger/images/arrow.svg);
    background-size: contain;
    -moz-context-properties: fill;
    fill: var(--theme-icon-dimmed-color);
    rotate: -90deg;
    transition: rotate 180ms var(--animation-curve);

    &:dir(rtl) {
      rotate: 90deg;
    }
  }

  &[aria-expanded="true"]::before {
    /* icon should always point to the bottom (default) when expanded,
    regardless of the text direction */
    rotate: 0deg !important;
  }
}

.accordion ._header .header-buttons {
  display: flex;
  margin-inline-start: auto;
}

.accordion ._header .header-buttons button {
  color: var(--theme-body-color);
  border: none;
  background: none;
  padding: 0;
  margin: 0 2px;
  width: 16px;
  height: 16px;
}

.accordion ._header .header-buttons button::-moz-focus-inner {
  border: none;
}

.accordion ._header .header-buttons button .img {
  display: block;
}

.accordion ._content {
  border-bottom: 1px solid var(--theme-splitter-color);
  font-size: var(--theme-body-font-size);
}

.accordion div:last-child ._content {
  border-bottom: none;
}