138 lines
3.4 KiB
CSS
138 lines
3.4 KiB
CSS
/* 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/. */
|
|
|
|
:host(.infobar) {
|
|
--info-bar-background-color: light-dark(var(--color-white), rgb(66, 65, 77));
|
|
--info-bar-text-color: light-dark(var(--color-gray-100), var(--color-gray-0));
|
|
--info-bar-box-shadow: 0 1px 2px rgba(58, 57, 68, 0.1);
|
|
--message-bar-border-color: color-mix(in srgb, currentColor 9%, transparent);
|
|
--message-bar-border-radius: var(--border-radius-small);
|
|
--message-bar-icon-container-margin-block-start: 0;
|
|
|
|
position: relative;
|
|
|
|
&::before {
|
|
content: "";
|
|
display: block;
|
|
width: 2px;
|
|
position: absolute;
|
|
top: 0;
|
|
inset-inline-start: 0;
|
|
height: 100%;
|
|
border-start-start-radius: var(--message-bar-border-radius);
|
|
border-end-start-radius: var(--message-bar-border-radius);
|
|
}
|
|
|
|
.container {
|
|
/* Don't let lwthemes set a text-shadow. */
|
|
text-shadow: none;
|
|
padding-block: 3px;
|
|
align-items: center;
|
|
}
|
|
|
|
.text-container {
|
|
padding-block: calc(1lh - var(--icon-size) / 2);
|
|
}
|
|
|
|
.content {
|
|
gap: 0 12px;
|
|
height: fit-content;
|
|
}
|
|
|
|
.close {
|
|
margin-block: 4px;
|
|
margin-inline-start: 8px;
|
|
align-self: flex-start;
|
|
}
|
|
}
|
|
|
|
@media (prefers-contrast) {
|
|
:host(.infobar)::before {
|
|
background-color: CanvasText;
|
|
}
|
|
}
|
|
|
|
@media not (prefers-contrast) {
|
|
:host(.infobar) {
|
|
box-shadow: var(--info-bar-box-shadow);
|
|
/* if a custom background color is set, use that, otherwise fall back */
|
|
background-color: var(--info-bar-background-color-configurable, var(--info-bar-background-color));
|
|
color: var(--info-bar-text-color);
|
|
|
|
&::before {
|
|
background-image: linear-gradient(0deg, #9059ff 0%, #ff4aa2 52.08%, #ffbd4f 100%);
|
|
}
|
|
}
|
|
}
|
|
|
|
@media -moz-pref("browser.nova.enabled") {
|
|
:host(.infobar) {
|
|
--info-bar-background-color: transparent;
|
|
--info-bar-box-shadow: none;
|
|
--message-bar-icon-container-padding: 0px;
|
|
--message-bar-icon-container-margin-block-start: calc(var(--space-small) + var(--border-width));
|
|
|
|
border-width: 0;
|
|
border-radius: 0;
|
|
border-block-start: var(--border-width) solid var(--info-bar-border-color);
|
|
|
|
.icon-container {
|
|
background-color: transparent;
|
|
align-self: flex-start;
|
|
}
|
|
}
|
|
|
|
@media (prefers-contrast) {
|
|
:host([message-bar-type="infobar"]:last-of-type) {
|
|
border-end-start-radius: var(--border-radius-medium);
|
|
border-end-end-radius: var(--border-radius-medium);
|
|
overflow-y: clip;
|
|
}
|
|
}
|
|
|
|
:host(.infobar)::before {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
:host([message-bar-type="infobar"]:first-of-type) {
|
|
margin-block-start: var(--info-bar-margin-block-start);
|
|
}
|
|
|
|
:host([message-bar-type="infobar"]) {
|
|
margin: 0 var(--info-bar-margin-inline) var(--info-bar-margin-block-end);
|
|
}
|
|
|
|
::slotted(.notification-button-container) {
|
|
gap: 8px;
|
|
display: inline-flex;
|
|
}
|
|
|
|
::slotted(.text-link) {
|
|
margin: 0 !important;
|
|
}
|
|
|
|
img.inline-icon {
|
|
/* Align inline icon images in the message content */
|
|
vertical-align: middle;
|
|
max-height: 1lh;
|
|
/* Ensure they get the right fill color. */
|
|
-moz-context-properties: fill;
|
|
fill: currentColor;
|
|
}
|
|
|
|
strong {
|
|
font-weight: var(--font-weight-semibold);
|
|
}
|
|
|
|
/* type="system" infobar styles */
|
|
|
|
:host([type="system"]) .icon {
|
|
display: none;
|
|
}
|
|
|
|
:host([type="system"]) .content {
|
|
margin-inline-start: 0;
|
|
}
|