summaryrefslogtreecommitdiffstats
path: root/devtools/client/shared/components/NotificationBox.css
blob: eb0b4fe1dc61b53b71df1b9ed82830aeedf841fb (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
/* 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/. */

/* Layout */

.notificationbox .notificationInner {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.notificationInner .messageText {
  flex: 1;
  width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notificationInner .messageImage,
.notificationbox .notificationButton,
.notificationbox .messageCloseButton {
  flex: none;
}

.notificationbox .notificationInner:dir(rtl) {
  flex-direction: row-reverse;
}

/* Style */

.notificationbox .notification {
  color: var(--theme-toolbar-color);
  background-color: var(--theme-body-background);
  text-shadow: none;
  border-color: var(--theme-splitter-color);
  border-style: solid;
  border-width: 0;
}

.notificationbox.border-top .notification {
  border-top-width: 1px;
}

.notificationbox.border-bottom .notification {
  border-bottom-width: 1px;
}

.notificationbox .notification[data-type="info"] {
  color: -moz-DialogText;
  background-color: -moz-Dialog;
}

.notificationbox .notification[data-type="critical"] {
  color: white;
  background-image: linear-gradient(rgb(212,0,0), rgb(152,0,0));
}

.notificationbox .messageImage {
  -moz-context-properties: fill;
  fill: currentColor;
  background-size: 16px;
  width: 16px;
  height: 16px;
  margin: 6px;
}

/* Default icons for notifications */

.notificationbox .messageImage[data-type="info"] {
  background-image: url("chrome://devtools/skin/images/info.svg");
}

.notificationbox .messageImage[data-type="warning"] {
  background-image: url("chrome://global/skin/icons/warning.svg");
  /* Keep the icon colored to make it more eye-catching */
  fill: #ffbf00;
}

.notificationbox .messageImage[data-type="critical"] {
  background-image: url("chrome://devtools/skin/images/error.svg");
}

/* Close button */

.notificationbox .messageCloseButton {
  width: 24px;
  height: 24px;
  margin: 2px 4px;
  background-image: url("chrome://devtools/skin/images/close.svg");
  background-position: center;
  background-color: transparent;
  background-repeat: no-repeat;
  border-radius: 2px;
  border-width: 0;
  -moz-context-properties: fill;
  fill: currentColor;
}

.notificationbox .messageCloseButton:hover {
  background-color: gray;
  filter: invert(1);
}

.notificationbox .messageCloseButton:active {
  background-color: rgba(170, 170, 170, .4); /* --toolbar-tab-hover-active */
}

.notificationbox.wrapping .notificationInner .messageText {
  white-space: normal;
}