File: browser.css

package info (click to toggle)
firefox 141.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,550,588 kB
  • sloc: cpp: 7,426,506; javascript: 6,367,238; ansic: 3,707,351; python: 1,369,002; xml: 623,983; asm: 426,918; java: 184,324; sh: 64,488; makefile: 19,203; objc: 13,059; perl: 12,955; yacc: 4,583; cs: 3,846; pascal: 3,352; lex: 1,720; ruby: 1,071; exp: 762; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10
file content (249 lines) | stat: -rw-r--r-- 6,150 bytes parent folder | download | duplicates (2)
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
/* 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/. */

@import url("chrome://browser/skin/browser-shared.css");
@import url("chrome://browser/skin/contextmenu.css");

/**
 * We still want to do some of the tweaks that browser-colors does, like
 * disabling the toolbar field border and backgrounds.
 */
@media not (prefers-contrast) {
  :root:not([lwtheme]) {
    @media (-moz-gtk-theme-family) {
      --tabs-navbar-separator-style: none;
      @media (prefers-color-scheme: light) {
        --urlbar-box-bgcolor: #fafafa;
      }
    }
  }
}

#menubar-items {
  flex-direction: column; /* for flex hack */
  justify-content: normal; /* align the menubar to the top also in customize mode */
}

/**
 * Titlebar drawing:
 *
 * GTK windows have both a window radius (exposed via the
 * `-moz-gtk-csd-titlebar-radius`) environment variable, and a window shadow
 * (which we can't read back from GTK). Note that the -moz-window-decorations
 * (in X11) or the compositor (in Wayland) does draw the shadow corners
 * already.
 */
:root[customtitlebar] {
  background-color: transparent;

  &[sizemode="normal"]:not([gtktiledwindow="true"]) {
    /* This takes care of drawing our window decorations on X11 */
    -moz-default-appearance: -moz-window-decorations;
    appearance: auto;

    #navigator-toolbox,
    dialog::backdrop {
      border-top-left-radius: env(-moz-gtk-csd-titlebar-radius);
      border-top-right-radius: env(-moz-gtk-csd-titlebar-radius);
    }

    /* stylelint-disable-next-line media-query-no-invalid */
    @media -moz-pref("widget.gtk.rounded-bottom-corners.enabled") {
      #navigator-toolbox {
        /* The body clip below covers this. */
        border-radius: 0;
      }

      body,
      dialog::backdrop {
        /* Use an uniform clip to allow WebRender to optimize it better */
        border-radius: env(-moz-gtk-csd-titlebar-radius);
      }
    }
  }
}

/* Bookmark menus */
.bookmark-item {
  &:is(menu, menuitem) {
    min-width: 0;
    max-width: 32em;
  }

  &:not(.subviewbutton) > .menu-icon {
    margin-block: 0;
  }

  /* Bookmark drag and drop styles */
  &[dragover-into="true"] {
    background: SelectedItem !important;
    color: SelectedItemText !important;
  }
}

/* Address bar */
#urlbar,
#searchbar {
  font-size: 1.05em;
}

/* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("browser.urlbar.experimental.expandTextOnFocus") {
  #urlbar[breakout-extend] {
    font-size: 1.14em;
  }
}

/* AutoComplete */

#PopupAutoComplete > richlistbox > richlistitem[originaltype~="datalist-first"] {
  border-top: 1px solid ThreeDShadow;
}

/* Tabstrip */

#tabbrowser-tabs {
  /* override the native styling */
  border-bottom: 0;
}

#TabsToolbar {
  min-height: 0;
}

.browser-titlebar,
#main-menubar {
  appearance: none;
  background-color: transparent;
  color: inherit;
}

/* All tabs menupopup */

.alltabs-item[selected="true"] {
  font-weight: bold;
}

#UITourHighlight {
  /* Below are some fixes for people without an X compositor on Linux.
     This is why we can't have nice things: */
  /* Animations don't repaint properly without an X compositor. */
  animation-name: none !important;
  /* Opacity rounds to 0 or 1 on Linux without an X compositor, making the
     background color not visible. Anti-aliasing is not available either. Make a
     thicker outline and cancel border-radius for that case. */
  outline: 4px solid rgb(0, 200, 215);
  border-radius: 0 !important;
}

#UITourTooltipDescription {
  font-size: 1.05rem;
}

#UITourTooltipClose {
  margin-inline-end: -4px;
}

/**
 * Override the --arrowpanel-padding so the background extends
 * to the sides and bottom of the panel.
 */
#UITourTooltipButtons {
  margin-inline-start: -10px;
  margin-bottom: -10px;
}

/* The button box must appear on top of the navigator-toolbox in order for
 * click and hover mouse events to work properly for the button in the restored
 * window state. Otherwise, elements in the navigator-toolbox, like the menubar,
 * can swallow those events. */
.titlebar-buttonbox {
  z-index: 1;
  align-items: stretch;
}

@media (-moz-gtk-csd-reversed-placement) {
  .titlebar-buttonbox-container {
    order: -1;
  }
}

.titlebar-button {
  appearance: none;
  color: inherit;
  align-items: center;
  padding: 0;
  padding-inline: calc(env(-moz-gtk-csd-titlebar-button-spacing) / 2);

  > .toolbarbutton-icon {
    border-radius: 100%;
    background-position: center center;
    background-repeat: no-repeat;
    -moz-context-properties: stroke;
    stroke: currentColor;
    /* Roughly the Adwaita size */
    width: 24px;
    height: 24px;
    /* Matches the libadwaita transition */
    transition: background-color 0.2s ease;
  }

  &:hover > .toolbarbutton-icon {
    background-color: color-mix(in srgb, currentColor 15%, transparent);
  }

  &:hover:active > .toolbarbutton-icon {
    background-color: color-mix(in srgb, currentColor 30%, transparent);
  }

  &:focus-visible > .toolbarbutton-icon {
    outline: var(--focus-outline);
    outline-offset: var(--focus-outline-inset);
  }
}

.titlebar-max {
  order: env(-moz-gtk-csd-maximize-button-position);
  > .toolbarbutton-icon {
    background-image: -moz-symbolic-icon(window-maximize-symbolic);
  }
}

.titlebar-restore {
  order: env(-moz-gtk-csd-maximize-button-position);
  > .toolbarbutton-icon {
    background-image: -moz-symbolic-icon(window-restore-symbolic);
  }
}

@media not (-moz-gtk-csd-maximize-button) {
  .titlebar-restore,
  .titlebar-max {
    display: none;
  }
}

.titlebar-close {
  order: env(-moz-gtk-csd-close-button-position);

  > .toolbarbutton-icon {
    background-image: -moz-symbolic-icon(window-close-symbolic);
  }

  @media not (-moz-gtk-csd-close-button) {
    display: none;
  }
}

.titlebar-min {
  order: env(-moz-gtk-csd-minimize-button-position);

  > .toolbarbutton-icon {
    background-image: -moz-symbolic-icon(window-minimize-symbolic);
  }

  @media not (-moz-gtk-csd-minimize-button) {
    display: none;
  }
}