summaryrefslogtreecommitdiffstats
path: root/toolkit/themes/osx/global/notification.css
blob: 24b3d3920b4e6df50c19e7527f887eb46f6efa40 (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
/* 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/. */

%include shared.inc
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

notification {
  padding: 3px 3px 4px;
  text-shadow: none;
}

notification[type="info"] {
  color: rgba(255,255,255,0.95);
  background: linear-gradient(#606060, #404040);
  border-top: 1px solid #2a2a2a;
  border-bottom: 1px solid #2a2a2a;
}

notification[type="warning"] {
  color: rgba(0,0,0,0.95);
  background: linear-gradient(#ffe13e, #ffc703);
  border-top: 1px solid #bf8a01;
  border-bottom: 1px solid #bf8a01;
}

notification[type="critical"] {
  color: rgba(255,255,255,0.95);
  background: linear-gradient(#d40000, #980000);
  border-top: 1px solid #5d0000;
  border-bottom: 1px solid #5d0000;
}

notificationbox[notificationside="top"] > notification {
  border-top-style: none;
}

notificationbox[notificationside="bottom"] > notification {
  border-bottom-style: none;
}

.messageText > .text-link {
  color: inherit !important;
  text-decoration: underline;
}

.messageImage {
  width: 16px;
  height: 16px;
  margin: 0 4px;
}

/* Default icons for notifications */

.messageImage[type="info"] {
  list-style-image: url("chrome://global/skin/notification/info-icon.png");
}

.messageImage[type="warning"] {
  list-style-image: url("chrome://global/skin/notification/warning-icon.png");
}

.messageImage[type="critical"] {
  list-style-image: url("chrome://global/skin/notification/error-icon.png");
}

.messageText {
  margin: 0 3px !important;
  padding: 0;
  font-weight: bold;
}

.messageCloseButton {
  -moz-appearance: none;
  padding: 0;
  margin: 0 2px;
  border: none;
}

/*
 Invert the close icon for @type=info since both are normally dark. It's unclear
 why !important is necessary here so remove it if it's no longer needed.
*/
notification[type="info"]:not([value="translation"]) .close-icon:not(:hover) {
  -moz-image-region: rect(0, 64px, 16px, 48px) !important;
}

@media (min-resolution: 2dppx) {
  notification[type="info"]:not([value="translation"]) .close-icon:not(:hover) {
    -moz-image-region: rect(0, 128px, 32px, 96px) !important;
  }
}

.messageCloseButton:-moz-focusring > .toolbarbutton-icon {
  border-radius: 10000px;
  box-shadow: 0 0 2px 1px -moz-mac-focusring,
              0 0 0 2px -moz-mac-focusring inset;
}

@media (min-resolution: 2dppx) {
  .messageCloseButton > .toolbarbutton-icon {
    width: 16px;
  }
}

/* Popup notification */

.popup-notification-body {
  max-width: 25em;
}

.popup-notification-origin:not([value]),
.popup-notification-learnmore-link:not([href]) {
  display: none;
}

.popup-notification-origin {
  margin-bottom: .3em !important;
}

.popup-notification-learnmore-link {
  margin-top: .5em !important;
}

.popup-notification-button-container {
  margin-top: 17px;
}

.popup-notification-menubutton {
  -moz-appearance: none;
}

.popup-notification-menubutton:not([type="menu-button"]):-moz-focusring,
.popup-notification-menubutton:-moz-focusring > .button-menubutton-dropmarker,
.popup-notification-menubutton > .button-menubutton-button:-moz-focusring {
  box-shadow: @focusRingShadow@;
  position: relative;
}

.popup-notification-menubutton:not([type="menu-button"]),
.popup-notification-menubutton > .button-menubutton-button,
.popup-notification-menubutton > .button-menubutton-dropmarker {
  -moz-appearance: none;
  color: #434343;
  border-radius: 4px;
  border: 1px solid #b5b5b5;
  background: linear-gradient(#fff, #f2f2f2);
  box-shadow: inset 0 1px rgba(255,255,255,.8),
              inset 0 0 1px rgba(255,255,255,.25),
              0 1px rgba(255,255,255,.3);
  background-clip: padding-box;
  background-origin: padding-box;
  padding: 2px 6px;
}

.popup-notification-menubutton > .button-menubutton-button {
  -moz-appearance: none;
  margin: 0;
  padding-top: 2px;
  padding-bottom: 2px;
  padding-inline-start: 8px;
  padding-inline-end: 5px;
}

.popup-notification-menubutton > .button-menubutton-dropmarker {
  padding: 7px 8px;
  margin-top: 0;
  margin-bottom: 0;
  margin-inline-start: -1px;
  list-style-image: url("chrome://global/skin/icons/panel-dropmarker.png");
}

.popup-notification-menubutton > .button-menubutton-button:-moz-locale-dir(ltr),
.popup-notification-menubutton > .button-menubutton-dropmarker:-moz-locale-dir(rtl) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.popup-notification-menubutton > .button-menubutton-button:-moz-locale-dir(rtl),
.popup-notification-menubutton > .button-menubutton-dropmarker:-moz-locale-dir(ltr) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.popup-notification-menubutton:not([type="menu-button"]):hover:active,
.popup-notification-menubutton > .button-menubutton-button:hover:active,
.popup-notification-menubutton[open="true"] > .button-menubutton-dropmarker {
  box-shadow: inset 0 1px 4px -3px #000, 0 1px rgba(255, 255, 255, 0.3);
}

.popup-notification-closebutton {
  margin-inline-end: -12px;
  margin-top: -13px;
}

.popup-notification-closeitem > .menu-iconic-left {
  display: none;
}

.popup-notification-menubutton > .button-menubutton-button[disabled] {
  opacity: 0.5;
}

.popup-notification-warning {
  color: #aa1b08;
}