summaryrefslogtreecommitdiffstats
path: root/comm/mail/themes/shared/mail/unifiedToolbarCustomizationPane.css
blob: bd8f73795eed9f53ad0f6ee5f5684d8cc576d344 (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
/* 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/. */

/* This is the main stylesheet in the unified-toolbar-customization-pane shadowRoot. */

@import url("chrome://messenger/skin/widgets.css");
@import url("chrome://messenger/skin/shared/unifiedToolbarCustomizableItems.css");
@import url("chrome://messenger/skin/shared/unifiedToolbarShared.css");

.search-button-icon {
  content: var(--icon-search);
}

.palette-search {
  display: block;
  margin: 12px 0;
  max-width: 50ch;
  height: 2em;
  width: 100%;
  align-self: center;
}

[is="customization-target"],
[is="customization-palette"] {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

[is="customization-target"]:focus-visible,
[is="customization-palette"]:focus-visible {
  outline: var(--focus-outline);
  outline-color: transparent;
}

.toolbar-target {
  /* TODO this should match actual titlebar dimensions */
  background: var(--layout-background-3);
  border-radius: 6px;
  padding-inline: 9px;
  padding-block: var(--unified-toolbar-padding);
  margin: 1rem;
  max-width: 100vw;
  border: 1px solid var(--layout-border-0);
  gap: 6px;
  min-height: calc(1rem + 3 * var(--button-padding));
}

.toolbar-target .button.unified-toolbar-button {
  margin-block: 0;
}

.toolbar-target .spacer {
  color: color-mix(in srgb, var(--layout-color-1) 50%, transparent);
  background-image: linear-gradient(to left, currentColor 0%, currentColor 50%, transparent 50%, transparent 100%);
  background-size: 9px 1px;
  background-position: 5px center;
  background-repeat: repeat-x;
  position: relative;
  height: 100%;
  -moz-context-properties: stroke;
  stroke: currentColor;
}

.toolbar-target .spacer::before,
.toolbar-target .spacer::after {
  content: '';
  width: 16px;
  position: absolute;
  height: 100%;
  background-repeat: no-repeat;
  background-position-y: center;
}

.toolbar-target .spacer::before {
  background-image: var(--icon-nav-left);
  left: -5px;
}

.toolbar-target .spacer::after {
  background-image: var(--icon-nav-right);
  right: -5px;
}

.toolbar-target .throbber .throbber-icon {
  visibility: visible;
}

/* buttons are disabled in the preview, but we want them to look active. */
.toolbar-target .unified-toolbar-button[disabled] {
  color: inherit;
  opacity: 1;
}

[is="customization-target"] [is="customizable-element"] .live-content {
  pointer-events: none;
}

[is="customization-target"] [is="customizable-element"] .preview {
  display: none;
}

[is="customization-target"] .collapsed {
  display: none;
}

.customization-palettes {
  overflow: auto;
}

[is="customization-palette"] {
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem;
}

[is="customization-palette"]:not(:last-of-type) {
  margin-block-end: 2.5rem;
}

h2 {
  margin-inline: 1rem;
  user-select: none;
}

[is="customizable-element"] {
  margin: 0;
  padding: 0;
}

[is="customization-target"]:focus-within [is="customizable-element"][aria-selected="true"],
[is="customization-palette"]:focus-within [is="customizable-element"][aria-selected="true"] {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
}

[is="customization-palette"] [is="customizable-element"] {
  width: 96px;
  height: calc(25px + 2.4rem); /* icon: 16px, gap: 9px, 2.4rem = ~2lh */
  background: var(--layout-background-3);
  padding: 9px;
  border-radius: 6px;
  overflow: hidden;
}

[is="customization-palette"] [is="customizable-element"] .live-content {
  display: none;
}

.preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  gap: 9px;
  -moz-context-properties: fill, stroke;
  fill: color-mix(in srgb, currentColor 20%, transparent);
  stroke: currentColor;
}

.preview-icon {
  height: 16px;
  width: 16px;
  object-fit: contain;
  pointer-events: none;
}

.preview-label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  text-overflow: ellipsis;
  user-select: none;
  padding-inline: 3px;
  max-width: 100%;
}

/* Drag and drop state styling */

.drop-before {
  border-inline-start: 1px solid currentColor;
}

.drop-after {
  border-inline-end: 1px solid currentColor;
}

.dragging {
  visibility: hidden;
}