0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-24 05:16:17 +01:00
gitea/web_src/css/modules/toast.css
wxiaoguang c1fe6fbcc3
Make toast support preventDuplicates (#31501)
make preventDuplicates default to true, users get a clear UI feedback
and know that "a new message appears".

Fixes: https://github.com/go-gitea/gitea/issues/26651

---------

Co-authored-by: silverwind <me@silverwind.io>
2024-06-27 13:58:38 +00:00

92 lines
1.3 KiB
CSS

.toastify {
color: var(--color-white);
position: fixed;
opacity: 0;
transition: all .2s ease;
z-index: 500;
border-radius: var(--border-radius);
box-shadow: 0 8px 24px var(--color-shadow);
display: flex;
max-width: 50vw;
min-width: 300px;
padding: 4px;
}
.toastify.on {
opacity: 1;
}
.toast-body {
flex: 1;
padding: 5px 0;
overflow-wrap: anywhere;
}
.toast-close {
border-radius: var(--border-radius);
width: 30px;
height: 30px;
justify-content: center;
}
.toast-icon {
display: inline-flex;
width: 30px;
height: 30px;
align-items: center;
justify-content: center;
}
.toast-duplicate-number::before {
content: "(";
}
.toast-duplicate-number {
display: inline-block;
margin-right: 5px;
user-select: none;
}
.toast-duplicate-number::after {
content: ")";
}
.toast-close:hover {
background: var(--color-hover);
}
.toast-close:active {
background: var(--color-active);
}
.toastify-right {
right: 15px;
}
.toastify-left {
left: 15px;
}
.toastify-top {
top: -150px;
}
.toastify-bottom {
bottom: -150px;
}
.toastify-center {
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
}
@media (max-width: 360px) {
.toastify-right, .toastify-left {
margin-left: auto;
margin-right: auto;
left: 0;
right: 0;
max-width: fit-content;
}
}