summaryrefslogtreecommitdiffstats
path: root/browser/themes/shared/places/sidebar.css
blob: d8bb12e2415bc15fb8abf3a9db421650eefa7210 (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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
/* 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/. */

.sidebar-panel {
  appearance: none;
  background-color: transparent;
}

/* Themed sidebars */

.sidebar-panel[lwt-sidebar] {
  background-color: var(--lwt-sidebar-background-color);
  color: var(--lwt-sidebar-text-color);
  color-scheme: light;

  scrollbar-color:
    light-dark(
      rgba(204,204,204,.5),
      rgba(249,249,250,.4)
    )
    light-dark(
      rgba(230,230,235,.5),
      rgba(20,20,25,.3)
    );
}

.sidebar-panel[lwt-sidebar="dark"] {
  color-scheme: dark;
}

.sidebar-panel[lwt-sidebar] .sidebar-placesTreechildren::-moz-tree-row(selected) {
  background-color: light-dark(hsla(0,0%,80%,.3), rgba(249,249,250,.1));
}

.sidebar-panel[lwt-sidebar="dark"] .sidebar-placesTreechildren {
  &::-moz-tree-image(selected),
  &::-moz-tree-twisty(selected),
  &::-moz-tree-cell-text(selected) {
    color: var(--lwt-sidebar-text-color);
  }
}

.sidebar-panel[lwt-sidebar-highlight] .sidebar-placesTreechildren {
  &::-moz-tree-row(selected,focus) {
    background-color: var(--lwt-sidebar-highlight-background-color);
  }

  &::-moz-tree-image(selected, focus),
  &::-moz-tree-twisty(selected, focus),
  &::-moz-tree-cell-text(selected, focus) {
    color: var(--lwt-sidebar-highlight-text-color, var(--lwt-sidebar-text-color, var(--sidebar-text-color)));
  }
}

/* Sidebar tree */

.sidebar-placesTree {
  appearance: none;
  background-color: transparent;
  color: inherit;
  border: 0;
  margin: 0;
}

/* View button */

#viewButton {
  appearance: none;
  border-radius: 4px;
  padding: 2px 4px;
  color: inherit;
}

#viewButton:hover {
  /* Matches --toolbarbutton-hover-background: */
  background-color: color-mix(in srgb, currentColor 17%, transparent);
}

#viewButton[open] {
  /* Matches --toolbarbutton-active-background: */
  background-color: color-mix(in srgb, currentColor 30%, transparent);
}

#viewButton:focus-visible {
  outline: var(--focus-outline);
}

#viewButton > .button-box > .button-menu-dropmarker {
  appearance: none;
  display: flex;
  content: url("chrome://global/skin/icons/arrow-down-12.svg");
  -moz-context-properties: fill;
  fill: currentColor;
}

@media (-moz-platform: windows) {
  :root[uidensity=touch] #search-box,
  :root[uidensity=touch] .sidebar-placesTreechildren::-moz-tree-row {
    min-height: 32px;
  }

  .sidebar-placesTreechildren::-moz-tree-cell,
  .sidebar-placesTreechildren::-moz-tree-twisty {
    padding: 0 4px;
  }

  .sidebar-placesTreechildren::-moz-tree-cell(leaf) ,
  .sidebar-placesTreechildren::-moz-tree-image(leaf) {
    cursor: pointer;
  }

  .sidebar-placesTreechildren::-moz-tree-cell-text(leaf, hover) {
    cursor: pointer;
    text-decoration: underline;
  }

  .sidebar-placesTreechildren::-moz-tree-cell(separator) {
    cursor: default;
  }

  @media not (prefers-contrast) {
    .sidebar-placesTreechildren::-moz-tree-cell-text(leaf, hover) {
      text-decoration: none;
    }
  }

  /* Default button vert. margins are 1px/2px, and this can cause misalignment */
  #viewButton {
    margin: 0;
    margin-inline-start: 4px;
    border-radius: 2px;
  }

  #sidebar-search-container {
    padding: 8px;
  }

  #search-box {
    margin: 0;
  }
}

@media (-moz-platform: linux) {
  #sidebar-search-container {
    padding: 8px;
  }

  #search-box {
    margin: 0;
  }

  #viewButton {
    margin: 1px 0;
    margin-inline-start: 4px;
  }

  :root[uidensity=touch] #search-box,
  :root[uidensity=touch] .sidebar-placesTreechildren::-moz-tree-row {
    min-height: 32px;
  }

  .sidebar-placesTreechildren::-moz-tree-cell(leaf) ,
  .sidebar-placesTreechildren::-moz-tree-image(leaf) {
    cursor: pointer;
  }

  .sidebar-placesTreechildren::-moz-tree-cell-text(leaf, hover) {
    cursor: pointer;
    text-decoration: underline;
  }

  .sidebar-placesTreechildren::-moz-tree-cell(separator) {
    cursor: default;
  }
}

@media (-moz-platform: macos) {
  .sidebar-placesTree {
    margin: 0;
    /* Default font size is 11px on mac, so this is 12px */
    font-size: 1.0909rem;
  }

  :root[uidensity=touch] .sidebar-placesTreechildren::-moz-tree-row {
    min-height: 32px;
  }

  .sidebar-placesTreechildren::-moz-tree-separator {
    border-top: 1px solid #505d6d;
    margin: 0 10px;
  }

  .sidebar-placesTreechildren::-moz-tree-cell-text {
    margin-inline-end: 6px;
  }

  #sidebar-search-container {
    /* Native searchbar styling already adds 4px margin on Mac, so
     * adding 4px padding results in 8px of total whitespace. */
    padding: 4px;
  }

  #viewButton {
    margin: 4px 0;
    margin-inline-end: 4px;
    /* Default font size is 11px on mac, so this is 12px */
    font-size: 1.0909rem;
  }
}