2017-08-13 17:06:33 +03:00
|
|
|
/* 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 url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
2021-03-29 05:38:56 +03:00
|
|
|
@namespace html "http://www.w3.org/1999/xhtml";
|
2017-08-13 17:06:33 +03:00
|
|
|
|
2018-11-09 17:58:18 +03:00
|
|
|
.notificationbox-stack {
|
2020-08-24 01:24:20 +03:00
|
|
|
/* Prevent the animation from overlapping the navigation toolbar */
|
2020-08-01 04:56:58 +03:00
|
|
|
overflow: clip;
|
2018-11-09 17:58:18 +03:00
|
|
|
}
|
|
|
|
|
2020-08-24 01:24:20 +03:00
|
|
|
.notificationbox-stack[notificationside="top"] {
|
|
|
|
/* Create a stacking context for the box-shadow */
|
|
|
|
position: relative;
|
|
|
|
z-index: 1;
|
2021-03-29 05:38:56 +03:00
|
|
|
}
|
|
|
|
|
2017-08-13 17:06:33 +03:00
|
|
|
notification {
|
2021-02-22 15:47:30 +03:00
|
|
|
min-height: 40px;
|
2020-08-24 01:24:20 +03:00
|
|
|
padding-inline-start: 16px;
|
|
|
|
background: var(--notification-background);
|
|
|
|
color: var(--notification-text);
|
|
|
|
border-color: var(--notification-border);
|
2017-08-13 17:06:33 +03:00
|
|
|
border-style: solid;
|
|
|
|
border-width: 1px 0;
|
|
|
|
text-shadow: none;
|
2020-08-24 01:24:20 +03:00
|
|
|
font-size: 1.15em;
|
|
|
|
|
|
|
|
--notification-background: Window;
|
|
|
|
--notification-text: WindowText;
|
|
|
|
--notification-border: rgba(12, 12, 13, 0.2);
|
|
|
|
--notification-button-background: rgba(12,12,13,.1);
|
|
|
|
--notification-button-background-hover: rgba(12,12,13,0.2);
|
|
|
|
--notification-button-background-active: rgba(12,12,13,0.3);
|
|
|
|
--notification-button-text: inherit;
|
|
|
|
--notification-primary-button-background: #0060df;
|
|
|
|
--notification-primary-button-background-hover: #003eaa;
|
|
|
|
--notification-primary-button-background-active: #002275;
|
|
|
|
--notification-primary-button-text: rgb(249, 249, 250);
|
|
|
|
}
|
|
|
|
|
2022-03-25 17:58:59 +03:00
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
|
notification[type="info"]:-moz-lwtheme {
|
|
|
|
--notification-background: #38383d;
|
|
|
|
--notification-text: rgb(249, 249, 250);
|
|
|
|
}
|
|
|
|
|
|
|
|
notification[type="info"] {
|
|
|
|
--notification-button-background: rgba(249,249,250,.1);
|
|
|
|
--notification-button-background-hover: rgba(249,249,250,.2);
|
|
|
|
--notification-button-background-active: rgba(249,249,250,.3);
|
|
|
|
}
|
2017-08-13 17:06:33 +03:00
|
|
|
}
|
|
|
|
|
2021-03-29 05:38:56 +03:00
|
|
|
html|notification-message.animated,
|
2018-11-09 17:58:18 +03:00
|
|
|
notification.animated {
|
|
|
|
transition: margin-top 300ms var(--animation-easing-function), opacity 300ms var(--animation-easing-function);
|
|
|
|
}
|
|
|
|
|
|
|
|
.notificationbox-stack[notificationside="top"] > notification {
|
2017-08-13 17:06:33 +03:00
|
|
|
border-top-style: none;
|
|
|
|
}
|
|
|
|
|
2018-11-09 17:58:18 +03:00
|
|
|
.notificationbox-stack[notificationside="bottom"] > notification {
|
2017-08-13 17:06:33 +03:00
|
|
|
border-bottom-style: none;
|
|
|
|
}
|
|
|
|
|
2020-08-24 01:24:20 +03:00
|
|
|
notification[type="warning"] {
|
|
|
|
--notification-background: #ffe900;
|
|
|
|
--notification-text: #0c0c0d;
|
|
|
|
}
|
|
|
|
|
2017-08-13 17:06:33 +03:00
|
|
|
notification[type="critical"] {
|
2020-08-24 01:24:20 +03:00
|
|
|
--notification-background: #d70022;
|
|
|
|
--notification-text: #fff;
|
2017-08-13 17:06:33 +03:00
|
|
|
}
|
|
|
|
|
2020-08-24 01:24:20 +03:00
|
|
|
notification[type="critical"] > .close-icon:hover {
|
2021-03-05 05:30:23 +03:00
|
|
|
background-color: color-mix(in srgb, currentColor 20%, transparent);
|
2017-08-13 17:06:33 +03:00
|
|
|
}
|
|
|
|
|
2020-08-24 01:24:20 +03:00
|
|
|
notification[type="critical"] > .close-icon:hover:active {
|
2021-03-05 05:30:23 +03:00
|
|
|
background-color: color-mix(in srgb, currentColor 30%, transparent);
|
2017-08-13 17:06:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.messageText {
|
|
|
|
margin-inline-start: 12px !important;
|
2021-02-22 15:47:30 +03:00
|
|
|
margin-block: 0;
|
2017-08-13 17:06:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.messageText > .text-link {
|
2021-02-25 22:47:25 +03:00
|
|
|
text-decoration: underline;
|
2021-02-26 16:43:10 +03:00
|
|
|
margin-block: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.messageText > .text-link:not(.notification-link) {
|
|
|
|
color: inherit !important;
|
|
|
|
margin-inline: 0;
|
2017-08-13 17:06:33 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.messageImage {
|
2021-02-22 15:47:30 +03:00
|
|
|
width: 24px;
|
2021-02-23 10:52:29 +03:00
|
|
|
margin: 4px 0;
|
2017-08-13 17:06:33 +03:00
|
|
|
-moz-context-properties: fill;
|
|
|
|
fill: currentColor;
|
|
|
|
}
|
|
|
|
|
2018-11-13 15:56:42 +03:00
|
|
|
notification[type="info"] > hbox > .messageImage {
|
2017-08-13 17:06:33 +03:00
|
|
|
list-style-image: url("chrome://global/skin/icons/help.svg");
|
|
|
|
}
|
|
|
|
|
2018-11-13 15:56:42 +03:00
|
|
|
notification[type="warning"] > hbox > .messageImage {
|
2017-08-13 17:06:33 +03:00
|
|
|
list-style-image: url("chrome://global/skin/icons/warning.svg");
|
|
|
|
}
|
|
|
|
|
2018-11-13 15:56:42 +03:00
|
|
|
notification[type="critical"] > hbox > .messageImage {
|
2017-08-13 17:06:33 +03:00
|
|
|
list-style-image: url("chrome://global/skin/icons/error.svg");
|
|
|
|
}
|
|
|
|
|
|
|
|
.messageCloseButton {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.messageCloseButton > .toolbarbutton-icon {
|
2020-08-24 01:24:20 +03:00
|
|
|
padding: 6px;
|
2022-03-02 07:54:57 +03:00
|
|
|
width: 32px;
|
2020-08-24 01:24:20 +03:00
|
|
|
/* Close button needs to be clickable from the edge of the window */
|
2021-02-23 10:52:29 +03:00
|
|
|
margin-inline-end: 8px;
|
2020-08-24 01:24:20 +03:00
|
|
|
}
|
|
|
|
|
2022-03-02 07:54:57 +03:00
|
|
|
.messageCloseButton:focus-visible {
|
2020-11-20 19:39:29 +03:00
|
|
|
/* Override the dotted outline from button.css */
|
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
|
2022-03-02 07:54:57 +03:00
|
|
|
.messageCloseButton:focus-visible > .toolbarbutton-icon {
|
|
|
|
outline: var(--focus-outline);
|
2022-03-04 01:47:40 +03:00
|
|
|
outline-offset: var(--focus-outline-inset);
|
2022-03-02 07:54:57 +03:00
|
|
|
border-radius: var(--toolbarbutton-border-radius, 4px);
|
2020-11-17 01:19:56 +03:00
|
|
|
}
|
|
|
|
|
2020-08-24 01:24:20 +03:00
|
|
|
.notification-button {
|
|
|
|
appearance: none;
|
|
|
|
border: 1px solid transparent;
|
2021-02-22 15:47:30 +03:00
|
|
|
border-radius: 4px;
|
2020-08-24 01:24:20 +03:00
|
|
|
background-color: var(--notification-button-background);
|
2021-04-30 18:39:20 +03:00
|
|
|
color: var(--notification-button-text);
|
2021-02-22 15:47:30 +03:00
|
|
|
padding: 0 6px;
|
2020-08-24 01:24:20 +03:00
|
|
|
margin: 4px 8px;
|
2021-02-22 15:47:30 +03:00
|
|
|
height: 24px;
|
2017-08-13 17:06:33 +03:00
|
|
|
}
|
|
|
|
|
2020-08-24 01:24:20 +03:00
|
|
|
.notification-button[disabled] {
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
|
|
|
|
.notification-button:not([disabled]):hover {
|
|
|
|
background-color: var(--notification-button-background-hover);
|
|
|
|
}
|
|
|
|
|
|
|
|
.notification-button:not([disabled]):hover:active {
|
|
|
|
background-color: var(--notification-button-background-active);
|
|
|
|
}
|
|
|
|
|
2022-03-02 07:54:57 +03:00
|
|
|
.notification-button:focus-visible {
|
|
|
|
outline: var(--focus-outline);
|
|
|
|
outline-offset: var(--focus-outline-offset);
|
2020-11-17 01:19:56 +03:00
|
|
|
}
|
|
|
|
|
2020-08-24 01:24:20 +03:00
|
|
|
.notification-button.primary {
|
|
|
|
background-color: var(--notification-primary-button-background);
|
2022-03-02 07:54:57 +03:00
|
|
|
color: var(--notification-primary-button-text);
|
2020-11-17 01:19:56 +03:00
|
|
|
}
|
|
|
|
|
2020-08-24 01:24:20 +03:00
|
|
|
.notification-button.primary:not([disabled]):hover {
|
|
|
|
background-color: var(--notification-primary-button-background-hover);
|
|
|
|
}
|
|
|
|
|
|
|
|
.notification-button.primary:not([disabled]):hover:active {
|
|
|
|
background-color: var(--notification-primary-button-background-active);
|
|
|
|
}
|
2021-03-10 22:22:56 +03:00
|
|
|
|
2021-03-29 05:38:56 +03:00
|
|
|
.notificationbox-stack {
|
|
|
|
background-color: var(--toolbar-bgcolor);
|
2021-03-10 22:22:56 +03:00
|
|
|
width: 100%;
|
|
|
|
}
|