element-web/res/css/structures/_ToastContainer.pcss
Suguru Hirahara 92906c2130
Replace Sass variables with custom properties on _font-weights.pcss (#10554)
* Replace `$font-normal` and `$font-semi-bold`

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Replace `font-weight: 600` with the custom property

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Replace the existing variables

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-04-21 14:16:00 +00:00

164 lines
4.5 KiB
Text

/*
Copyright 2019-2021 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
.mx_ToastContainer {
position: absolute;
top: $spacing-4;
left: 70px;
z-index: 101;
display: grid;
grid-template-rows: 1fr 14px 6px;
&.mx_ToastContainer_stacked::before {
content: "";
margin: 0 4px;
grid-row: 2 / 4;
grid-column: 1;
background-color: $system;
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.5);
border-radius: 8px;
}
.mx_Toast_toast {
background-color: $system;
border-radius: 8px;
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.5);
color: $primary-content;
column-gap: $spacing-8;
display: grid;
grid-column: 1;
grid-row: 1 / 3;
grid-template-columns: 24px 1fr;
overflow: hidden;
padding: $spacing-16;
&.mx_Toast_hasIcon {
.mx_Toast_icon {
grid-column: 1;
grid-row: 1;
}
&::before,
&::after {
content: "";
width: 24px;
height: 24px;
grid-column: 1;
grid-row: 1;
mask-size: 100%;
mask-position: center;
mask-repeat: no-repeat;
background-size: 100%;
background-repeat: no-repeat;
}
&.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;
}
}
&.mx_Toast_icon_secure_backup::after {
mask-image: url("$(res)/img/feather-customised/secure-backup.svg");
background-color: $primary-content;
}
&.mx_Toast_icon_labs::after {
mask-image: url("$(res)/img/element-icons/flask.svg");
background-color: $secondary-content;
}
.mx_Toast_title,
.mx_Toast_body {
grid-column: 2;
}
}
&:not(.mx_Toast_hasIcon) {
padding-left: 12px;
.mx_Toast_title {
grid-column: 1 / -1;
}
}
.mx_Toast_title {
align-items: center;
box-sizing: border-box;
column-gap: 8px;
display: flex;
margin-bottom: $spacing-16;
width: 100%;
h2 {
color: $primary-content;
margin: 0;
font-size: $font-18px;
font-weight: var(--font-semi-bold);
}
.mx_Toast_title_countIndicator {
font-size: $font-12px;
line-height: $font-22px;
color: $secondary-content;
margin-inline-start: auto; /* on the end side of the div */
}
}
.mx_Toast_body {
grid-column: 1 / 3;
grid-row: 2;
position: relative;
}
.mx_Toast_buttons {
column-gap: $spacing-8;
display: flex;
justify-content: flex-end;
margin-top: $spacing-32;
}
.mx_Toast_description {
color: $primary-content;
font-size: $font-15px;
font-weight: var(--font-semi-bold);
max-width: 300px;
a {
text-decoration: none;
}
}
.mx_Toast_detail {
display: block;
font-weight: var(--font-normal);
margin-top: $spacing-4;
max-width: 300px;
}
.mx_Toast_deviceID {
font-size: $font-10px;
}
}
}