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

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

172 lines
4.6 KiB
Text
Raw Normal View History

2019-11-20 15:18:28 +00:00
/*
Copyright 2019-2021 The Matrix.org Foundation C.I.C.
2019-11-20 15:18:28 +00:00
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: 0;
left: 70px;
z-index: 101;
padding: 4px;
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);
2019-11-20 15:18:28 +00:00
border-radius: 8px;
}
.mx_Toast_toast {
grid-row: 1 / 3;
grid-column: 1;
background-color: $system;
color: $primary-content;
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.5);
2019-11-20 15:18:28 +00:00
border-radius: 8px;
overflow: hidden;
display: grid;
grid-template-columns: 22px 1fr;
column-gap: 8px;
2019-11-20 15:18:28 +00:00
row-gap: 4px;
padding: 8px;
&.mx_Toast_hasIcon {
&::before,
&::after {
2019-11-20 15:18:28 +00:00
content: "";
width: 22px;
height: 22px;
2019-11-20 15:18:28 +00:00
grid-column: 1;
grid-row: 1;
mask-size: 100%;
mask-position: center;
2019-11-20 15:18:28 +00:00
mask-repeat: no-repeat;
background-size: 100%;
background-repeat: no-repeat;
2019-11-20 15:18:28 +00:00
}
&.mx_Toast_icon_verification::after {
mask-image: url("$(res)/img/e2e/normal.svg");
background-color: $primary-content;
2019-11-20 15:18:28 +00:00
}
&.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: $alert;
}
}
&.mx_Toast_icon_secure_backup::after {
mask-image: url("$(res)/img/feather-customised/secure-backup.svg");
background-color: $primary-content;
}
Tweaks to informational architecture 1.1 (#7052) * Move user avatar to Space panel * Add room list header for 'Home' or 'Space Name' to room list Add existing Space context menus to room list header * Re-add pending room join spinner * Iterate RoomListHeader plus context menu * Iterate space context menu * Iterate room list + interactions * Move DND to new iA model * Replace composer custom status management with usermenu one * Cull Quick Actions * Iterate minimized room list state * delint * Merge the RoomListNumResults into the RoomListHeader * Make the search shortcut prompt semi-bold * Iterate RoomListHeader based on design review * Iterate UserMenu based on feedback * Add name to expanded spacepanel usermenu button * i18n * Make room sub list aux button components more generic * Change left panel explore button to only refer to room directory * Iterate RoomListHeader * Fix custom user status input field width in Chrome * Bring back Notification settings button * delint * i18n * post-merge fix * iterate pr * Remove unused state * update copy * Apply suggestions from PR review * delint * Update invite iconography * Iterate Space context menu to match Figma * Fix chevron alignment * Fix edge case for RoomListHeader on metaspaces * Wire up general rageshake-driven feedback mechanism * Add IA1.1 info toast * add missing alt attribute * delint * delint * tweak ia toast priority * e2e test account for new toast * autofocus feedback field and remove old subheading * tweak copy * Iterate space panel colours to match Figma * Iterate PR * delint * Fix feedback submission with object setting values * iterate based on review * Tweak colours and update splash image * Tweaks based on review * Remove room list prompt, made redundant by the big fat `+` * Fix edge cases around User Menu positioning and dnd * Add missing import, bad merge? * Update aria label in e2e test * Fix room list space rooms context menu explore button behaviour * Tweak copy * Revert order of options in the UserMenu * Tweak copy * i18n
2021-11-30 18:08:46 +00:00
&.mx_Toast_icon_labs::after {
mask-image: url("$(res)/img/element-icons/flask.svg");
background-color: $secondary-content;
}
.mx_Toast_title,
.mx_Toast_body {
2019-11-20 15:18:28 +00:00
grid-column: 2;
}
}
&:not(.mx_Toast_hasIcon) {
padding-left: 12px;
.mx_Toast_title {
grid-column: 1 / -1;
}
}
.mx_Toast_title,
.mx_Toast_description {
padding-right: 8px;
}
2019-11-20 15:18:28 +00:00
.mx_Toast_title {
display: flex;
align-items: center;
column-gap: 8px;
width: 100%;
box-sizing: border-box;
h2 {
margin: 0;
font-size: $font-15px;
font-weight: 600;
display: inline;
width: auto;
}
.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 */
}
2019-11-20 15:18:28 +00: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 15:18:28 +00:00
}
.mx_Toast_description {
max-width: 272px;
2020-04-29 16:38:32 +00:00
overflow: hidden;
text-overflow: ellipsis;
2019-11-20 15:18:28 +00:00
margin: 4px 0 11px 0;
font-size: $font-12px;
a {
text-decoration: none;
}
2019-11-20 15:18:28 +00:00
}
.mx_Toast_detail {
color: $secondary-content;
}
.mx_Toast_deviceID {
font-size: $font-10px;
}
2019-11-20 15:18:28 +00:00
}
}