Files
element-web/res/css/structures/_ToastContainer.pcss
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

161 lines
4.3 KiB
Plaintext
Raw Normal View History

2019-11-20 16:18:28 +01:00
/*
2024-09-09 14:57:16 +01:00
Copyright 2024 New Vector Ltd.
2021-03-26 11:13:39 +00:00
Copyright 2019-2021 The Matrix.org Foundation C.I.C.
2019-11-20 16:18:28 +01:00
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
2024-09-09 14:57:16 +01:00
Please see LICENSE files in the repository root for full details.
2019-11-20 16:18:28 +01:00
*/
.mx_ToastContainer {
position: absolute;
top: 0;
2019-11-20 16:18:28 +01:00
left: 70px;
z-index: 101;
padding: 4px;
2019-11-20 16:18:28 +01:00
display: grid;
grid-template-rows: 1fr 14px 6px;
&.mx_ToastContainer_stacked::before {
content: "";
margin: 0 4px;
grid-row: 2 / 4;
grid-column: 1;
2021-08-12 16:20:30 +02:00
background-color: $system;
2020-05-21 16:32:19 +01:00
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.5);
2019-11-20 16:18:28 +01:00
border-radius: 8px;
}
.mx_Toast_toast {
grid-row: 1 / 3;
grid-column: 1;
background-color: var(--cpd-color-bg-canvas-default);
2023-04-18 13:38:41 +02:00
color: $primary-content;
box-shadow: 0px 4px 24px rgba(0, 0, 0, 0.1);
border: var(--cpd-border-width-1) solid var(--cpd-color-border-interactive-secondary);
border-radius: 12px;
2023-04-18 13:38:41 +02:00
overflow: hidden;
display: grid;
grid-template-columns: 22px 1fr;
column-gap: 8px;
row-gap: 4px;
padding: var(--cpd-space-3x);
2019-11-20 16:18:28 +01:00
&.mx_Toast_hasIcon {
&::before,
&::after {
2019-11-20 16:18:28 +01:00
content: "";
width: 22px;
height: 22px;
2019-11-20 16:18:28 +01:00
grid-column: 1;
grid-row: 1;
mask-size: 100%;
mask-position: center;
2019-11-20 16:18:28 +01:00
mask-repeat: no-repeat;
2020-07-10 15:32:34 +01:00
background-size: 100%;
background-repeat: no-repeat;
2019-11-20 16:18:28 +01:00
}
&.mx_Toast_icon_verification::after {
mask-image: url("$(res)/img/e2e/normal.svg");
background-color: $primary-content;
}
&.mx_Toast_icon_verification_warning {
/* white infill for the hollow svg mask */
&::before {
background-color: #ffffff;
mask-image: url("$(res)/img/e2e/normal.svg");
mask-size: 80%;
}
&::after {
mask-image: url("$(res)/img/e2e/warning.svg");
background-color: $e2e-warning-color;
}
2020-01-17 11:43:35 +00:00
}
&.mx_Toast_icon_secure_backup::after {
mask-image: url("$(res)/img/feather-customised/secure-backup.svg");
2021-08-12 11:27:12 +02:00
background-color: $primary-content;
}
&.mx_Toast_icon_labs::after {
mask-image: url("$(res)/img/element-icons/flask.svg");
background-color: $secondary-content;
}
2020-05-21 16:52:36 +01:00
.mx_Toast_title,
.mx_Toast_body {
2019-11-20 16:18:28 +01:00
grid-column: 2;
}
}
2020-05-21 16:52:36 +01:00
&:not(.mx_Toast_hasIcon) {
padding-left: 12px;
.mx_Toast_title {
grid-column: 1 / -1;
}
}
.mx_Toast_title,
.mx_Toast_description {
padding-right: 8px;
}
2020-05-21 16:32:19 +01:00
.mx_Toast_title {
display: flex;
align-items: center;
column-gap: 8px;
2020-05-21 16:52:36 +01:00
width: 100%;
box-sizing: border-box;
2020-05-21 16:52:36 +01:00
2020-05-21 16:32:19 +01:00
h2 {
margin: 0;
font: var(--cpd-font-body-lg-semibold);
display: inline;
width: auto;
2020-05-21 16:32:19 +01:00
}
.mx_Toast_title_countIndicator {
2020-05-21 16:32:19 +01:00
font-size: $font-12px;
2020-05-21 17:12:16 +01:00
line-height: $font-22px;
2021-09-03 18:21:09 +02:00
color: $secondary-content;
margin-inline-start: auto; /* on the end side of the div */
2020-05-21 16:32:19 +01:00
}
2019-11-20 16:18:28 +01:00
}
.mx_Toast_body {
grid-column: 1 / 3;
grid-row: 2;
}
.mx_Toast_buttons {
display: flex;
justify-content: flex-end;
column-gap: 5px;
.mx_AccessibleButton {
min-width: 96px;
box-sizing: border-box;
}
2019-11-20 16:18:28 +01:00
}
.mx_Toast_description {
max-width: 272px;
overflow: hidden;
text-overflow: ellipsis;
margin: 4px 0 11px 0;
2024-07-30 13:57:15 +01:00
color: $secondary-content;
2023-06-29 11:30:25 +01:00
font: var(--cpd-font-body-sm-regular);
2020-05-21 16:32:19 +01:00
a {
text-decoration: none;
}
2019-11-20 16:18:28 +01:00
}
2020-01-29 15:00:01 +00:00
.mx_Toast_deviceID {
2020-03-31 15:26:23 +01:00
font-size: $font-10px;
2020-01-29 15:00:01 +00:00
}
2019-11-20 16:18:28 +01:00
}
}