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

.attachmentList {
  appearance: none;
  -moz-user-focus: normal;
  margin: 0;
  padding: 3px;
  background-color: var(--layout-background-2);
  color: var(--layout-color-2);
  border: none;
  display: flex;
  overflow-x: hidden;
  align-items: start;
  align-content: start;
  flex: 1;
  flex-direction: row;
  flex-wrap: wrap;
}

.attachmentList[collapsed] {
  display: none;
  height: 0;
}

.attachmentItem {
  border: 1px solid transparent;
  min-width: 10em;
  padding: 1px 3px;
  border-radius: 2px;
  display: flex;
  align-items: baseline;
}

.attachmentItem > * {
  /* We treat the entire attachment item as a single object for click events.
   * This ensures that dragging will drag the entire widget by default, and
   * click event targets will point to the attachmentItem, rather than a
   * descendant. */
  pointer-events: none;
}

.attachmentList:focus > .attachmentItem[selected="true"] > * {
  color: inherit;
}

.attachmentItem > .attachmentcell-icon {
  flex: 0 0 auto;
  align-self: center;
}

.attachmentItem > .attachmentcell-name {
  flex: 0 1 auto;
  white-space: nowrap;
  overflow-x: hidden;
  text-overflow: ellipsis;
}

.attachmentItem > .attachmentcell-extension {
  /* The extension part grows to fill the available space after the attachment
   * name, but the name part shrinks when we do not have enough space. */
  flex: 1 0 auto;
}

.attachmentItem > .attachmentcell-size {
  flex: 0 0 auto;
}

.attachmentList[seltype="multiple"]:focus .attachmentItem[current="true"] {
  border-color: var(--selected-item-color);
  outline: none;
}

/* Hide the drop indicator for the message pane attachment list. */
#attachmentList .attachmentItem .attach-drop-indicator {
  display: none;
}

#attachmentBucket .attachmentItem .attach-drop-indicator {
  position: absolute;
  z-index: 3;
  display: none;
  margin: -6px -6px -4px;
  transform: scale(0.8);
}

#attachmentBucket .attachmentItem[dropOn="before"] .attach-drop-indicator.before {
  display: inline;
}

#attachmentBucket .attachmentItem[dropOn="after"] .attach-drop-indicator.after {
  display: inline;
}

.attachmentList[seltype="multiple"]:focus
  .attachmentItem[current="true"][selected="true"] {
  border-color: var(--sidebar-highlight-border-color, var(--item-focus-selected-border-color));
}

:root[lwt-tree] .attachmentList {
  background-color: var(--sidebar-background-color);
  color: var(--sidebar-text-color);
}

:root[lwt-tree] .attachmentList .attachmentItem {
  color: var(--sidebar-text-color) !important;
}

:root[lwt-tree] .attachmentList .attachmentItem:hover {
  background-color: hsla(0, 0%, 50%, .15);
  border-color: transparent;
}

:root[lwt-tree] .attachmentList .attachmentItem[selected="true"] {
  border-color: hsla(0, 0%, 50%, 0.2);
  background: hsla(0, 0%, 50%, 0.2);
  color: var(--sidebar-text-color);
}

:root[lwt-tree] .attachmentList:focus .attachmentItem[selected="true"] {
  background: var(--sidebar-highlight-background-color, hsla(0, 0%, 80%, .3));
  color: var(--sidebar-highlight-text-color, var(--sidebar-text-color)) !important;
}

:root[lwt-tree-brighttext] .attachmentList:focus .attachmentItem[selected="true"] {
  background: var(--sidebar-highlight-background-color, rgba(249, 249, 250, .1));
}

#attachmentName.notfound,
.attachmentItem.notfound {
  text-decoration-line: line-through;
}

.attachmentcell-icon {
  margin: 1px;
  width: 16px;
  height: 16px;
}

.attachmentcell-name,
.attachmentcell-extension,
.attachmentcell-size {
  margin-block: 2px;
}

/* NOTE: We do not create a margin between the name and extension. */
.attachmentcell-name,
.attachmentcell-size {
  margin-inline-start: 6px;
}

.attachmentcell-extension,
.attachmentcell-size {
  margin-inline-end: 5px;
}

.attachmentcell-size {
  opacity: 0.6;
}

.attachmentList:focus .attachmentItem[selected="true"] .attachmentcell-size {
  opacity: 0.8;
}

.attachmentItem:not(.notfound):hover .text-link {
  text-decoration: underline;
}