summaryrefslogtreecommitdiffstats
path: root/browser/themes/shared/autocomplete.css
blob: 5830e5f528af3f930ea02732f8ccd9a77a4ac636 (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
/* 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/. */

@namespace html url("http://www.w3.org/1999/xhtml");

/* General popup rules */

#PopupAutoComplete > richlistbox > richlistitem {
  min-height: 20px;
  border: 0;
  border-radius: 0;
  padding: 0 1px;
}

#PopupAutoComplete > richlistbox > richlistitem > .ac-site-icon {
  margin-inline: 4px 0;
}

#PopupAutoComplete > richlistbox > richlistitem > .ac-login-item {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

#PopupAutoComplete > richlistbox > richlistitem > .ac-login-item > .ac-settings-button {
  visibility: hidden;
  height: 16px;
  width: 16px;
  border: 0;
  -moz-context-properties: fill;
  fill: currentColor;
  margin-inline: 8px;
  cursor: pointer;
  background: url("chrome://global/skin/icons/settings.svg") center no-repeat;
}

#PopupAutoComplete > richlistbox > richlistitem:is(:hover, [selected]) > .ac-login-item > .ac-settings-button {
  visibility: visible;
}

#PopupAutoComplete > richlistbox > richlistitem > .ac-title {
  font: icon;
  margin-inline-start: 4px;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="importableLearnMore"] {
  padding-bottom: 2px;
  padding-inline-start: 21px;
}

#PopupAutoComplete > richlistbox {
  padding: 0;
}

/* Popup states */

.autocomplete-richlistitem:hover {
  background-color: var(--arrowpanel-dimmed);
}

.autocomplete-richlistitem[selected] {
  background-color: SelectedItem;
  color: SelectedItemText;
}

/* Autocomplete richlistitem support for a two-line label display */

#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="login"] > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="possible-username"] > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper > .ac-site-icon {
  display: block;
  margin-inline: 4px;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="possible-username"] > .ac-site-icon {
  visibility: hidden;
}

#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper > .labels-wrapper {
  /* The text should flex while the icon should not */
  flex: 1;
  /* min-width is needed to get the text-overflow: ellipsis to work for the children */
  min-width: 0;
}

#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper > .labels-wrapper > .label-row {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="generatedPassword"] > .two-line-wrapper > .labels-wrapper > .generated-password-autosave,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="importableLearnMore"] > .ac-title,
#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper > .labels-wrapper > .line2-label {
  padding-top: 2px !important;
  opacity: .6;
}

/* Login form autocompletion (with and without origin showing) and generated passwords */
#PopupAutoComplete > richlistbox > richlistitem[originaltype="generatedPassword"] > .two-line-wrapper > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="loginWithOrigin"] > .two-line-wrapper > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="login"] > .ac-site-icon {
  fill: GrayText;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="importableLogins"] > .two-line-wrapper > .ac-site-icon {
  fill: GrayText;
  list-style-image: url(chrome://browser/skin/import.svg);
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="generatedPassword"][selected] > .two-line-wrapper > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="importableLogins"][selected] > .two-line-wrapper > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="loginWithOrigin"][selected] > .two-line-wrapper > .ac-site-icon,
#PopupAutoComplete > richlistbox > richlistitem[originaltype="login"] > .ac-site-icon[selected] {
  fill: SelectedItemText;
}

/* Login form autocompletion */
#PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper {
  padding: 4px;
  padding-inline-start: 0;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="generatedPassword"]:not([collapsed="true"]) {
  /* Workaround bug 451997 and/or bug 492645 */
  display: block;
}


#PopupAutoComplete > richlistbox > richlistitem[originaltype="generatedPassword"] > .two-line-wrapper > .labels-wrapper > .line2-label > span {
  /* The font-family is only adjusted on the inner span so that the
     line-height of .line2-label matches that of .line1-label */
  font-family: monospace;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="generatedPassword"] > .two-line-wrapper > .labels-wrapper > .generated-password-autosave > span {
  /* The font-* properties are only adjusted on the inner span so that the
     line-height of .generated-password-autosave matches that of .line1-label */
  font-style: italic;
  font-size: 0.85em;
  white-space: normal;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="login"] + richlistitem[originaltype="generatedPassword"],
#PopupAutoComplete > richlistbox > richlistitem[originaltype="loginWithOrigin"] + richlistitem[originaltype="generatedPassword"] {
  /* Separator between logins and generated passwords. This uses --panel-separator-color from default
   * themes since autocomplete doesn't yet switch to dark. */
  border-top: 1px solid hsla(210,4%,10%,.14);
}

/* Insecure field warning */
#PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"] {
  background-color: var(--arrowpanel-dimmed);
  border-bottom: 1px solid var(--panel-separator-color);
  padding-block: 4px;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"][selected] {
  background-color: var(--arrowpanel-dimmed-further);
  color: -moz-DialogText;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"] > .ac-title {
  color: var(--grey-60);
  font-size: 1em;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"] > .ac-title .ac-emphasize-text-title {
  font-weight: 600;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"][selected] > .ac-title {
  color: inherit;
}

#PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"] > .ac-site-icon {
  list-style-image: url(chrome://global/skin/icons/security-broken.svg);
  -moz-context-properties: fill;
  fill: var(--grey-60);
}