* feat: merge toastNotifications with original * feat: add README for toastNotifications * refactor: css class namespace * refactor: setContainerPosition on setting change * fix: timeout default to 5 on nullish
226 lines
No EOL
7.1 KiB
CSS
226 lines
No EOL
7.1 KiB
CSS
:root {
|
|
/* Body */
|
|
--vc-toast-notifications-background-color: var(--background-base-lower-alt);
|
|
--vc-toast-notifications-text-color: var(--text-default);
|
|
--vc-toast-notifications-border-radius: 6px;
|
|
--vc-toast-notifications-width: fit-content;
|
|
--vc-toast-notifications-min-width: 25rem;
|
|
--vc-toast-notifications-max-width: 50%;
|
|
--vc-toast-notifications-min-height: 10vh;
|
|
--vc-toast-notifications-max-height: 50%;
|
|
--vc-toast-notifications-padding: 1rem;
|
|
|
|
/* Title */
|
|
--vc-toast-notifications-title-color: var(--text-strong);
|
|
--vc-toast-notifications-title-font-size: 1rem;
|
|
--vc-toast-notifications-title-font-weight: 600;
|
|
--vc-toast-notifications-title-line-height: 1.25rem;
|
|
|
|
/* Close Button */
|
|
--vc-toast-notifications-close-button-color: var(--interactive-icon-default);
|
|
--vc-toast-notifications-close-button-hover-color: var(--interactive-icon-hover);
|
|
--vc-toast-notifications-close-button-opacity: 0.5;
|
|
--vc-toast-notifications-close-button-hover-opacity: 1;
|
|
|
|
/* Message Author Image */
|
|
--vc-toast-notifications-image-height: 4rem;
|
|
--vc-toast-notifications-image-width: var(--vc-toast-notifications-image-height);
|
|
--vc-toast-notifications-image-border-radius: 6px;
|
|
|
|
/* Progress Bar */
|
|
--vc-toast-notifications-progressbar-height: 0.25rem;
|
|
--vc-toast-notifications-progressbar-color: var(--brand-500);
|
|
|
|
/* Position Offset - Global inherited offset by all positions */
|
|
--vc-toast-notifications-position-offset: 1rem;
|
|
}
|
|
|
|
#vc-toast-notifications-container {
|
|
position: fixed;
|
|
z-index: 2147483647;
|
|
display: flex;
|
|
gap: 0.75rem;
|
|
pointer-events: none;
|
|
max-height: calc(100vh - var(--vc-toast-notifications-position-offset) * 2);
|
|
}
|
|
|
|
#vc-toast-notifications-container.vc-toast-notifications-position-bottom-left,
|
|
#vc-toast-notifications-container.vc-toast-notifications-position-bottom-right {
|
|
flex-direction: column;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
#vc-toast-notifications-container.vc-toast-notifications-position-top-left,
|
|
#vc-toast-notifications-container.vc-toast-notifications-position-top-right {
|
|
flex-direction: column-reverse;
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
.vc-toast-notifications-notification-root {
|
|
all: unset;
|
|
pointer-events: auto;
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
color: var(--vc-toast-notifications-text-color);
|
|
background-color: var(--vc-toast-notifications-background-color);
|
|
border-radius: var(--vc-toast-notifications-border-radius);
|
|
overflow: hidden;
|
|
cursor: pointer;
|
|
min-width: var(--vc-toast-notifications-min-width);
|
|
width: var(--vc-toast-notifications-width);
|
|
max-width: var(--vc-toast-notifications-max-width);
|
|
min-height: var(--vc-toast-notifications-min-height);
|
|
max-height: var(--vc-toast-notifications-max-height);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.vc-toast-notifications-notification-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: var(--vc-toast-notifications-padding) 0.2rem;
|
|
width: 100%;
|
|
}
|
|
|
|
.vc-toast-notifications-context-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
color: var(--vc-toast-notifications-title-color);
|
|
font-size: var(--vc-toast-notifications-title-font-size);
|
|
font-weight: var(--vc-toast-notifications-title-font-weight);
|
|
line-height: var(--vc-toast-notifications-title-line-height);
|
|
padding: 0 0.8rem 0.5rem;
|
|
}
|
|
|
|
.vc-toast-notifications-context-header-icon {
|
|
width: 1.5rem;
|
|
height: 1.5rem;
|
|
border-radius: 50%;
|
|
object-fit: cover;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.vc-toast-notifications-context-header-name {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
min-width: 0;
|
|
}
|
|
|
|
.vc-toast-notifications-context-header-separator {
|
|
color: var(--text-muted);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.vc-toast-notifications-context-header-channel {
|
|
color: var(--text-muted);
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* System-mode notifications (friend activity, example) */
|
|
.vc-toast-notifications-notification-system {
|
|
display: flex;
|
|
flex-direction: row;
|
|
padding: var(--vc-toast-notifications-padding);
|
|
gap: 1.25rem;
|
|
width: 100%;
|
|
}
|
|
|
|
.vc-toast-notifications-notification-system .vc-toast-notifications-notification-content {
|
|
display: block;
|
|
padding: 0;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.vc-toast-notifications-notification-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.vc-toast-notifications-notification-title {
|
|
color: var(--vc-toast-notifications-title-color);
|
|
font-size: var(--vc-toast-notifications-title-font-size);
|
|
font-weight: var(--vc-toast-notifications-title-font-weight);
|
|
line-height: var(--vc-toast-notifications-title-line-height);
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.vc-toast-notifications-notification-close-btn {
|
|
all: unset;
|
|
cursor: pointer;
|
|
color: var(--vc-toast-notifications-close-button-color);
|
|
opacity: var(--vc-toast-notifications-close-button-opacity);
|
|
transition: opacity 0.2s ease-in-out, color 0.2s ease-in-out;
|
|
position: absolute;
|
|
top: 0.4rem;
|
|
right: 0.4rem;
|
|
z-index: 1;
|
|
width: 1.5rem;
|
|
height: 1.5rem;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
background-color: var(--vc-toast-notifications-background-color);
|
|
}
|
|
|
|
.vc-toast-notifications-notification-close-btn svg {
|
|
width: 1.25rem;
|
|
height: 1.25rem;
|
|
}
|
|
|
|
.vc-toast-notifications-notification-close-btn:hover {
|
|
color: var(--vc-toast-notifications-close-button-hover-color);
|
|
opacity: var(--vc-toast-notifications-close-button-hover-opacity);
|
|
}
|
|
|
|
.vc-toast-notifications-notification-icon {
|
|
height: var(--vc-toast-notifications-image-height);
|
|
width: var(--vc-toast-notifications-image-width);
|
|
border-radius: var(--vc-toast-notifications-image-border-radius);
|
|
}
|
|
|
|
.vc-toast-notifications-notification-progressbar {
|
|
height: var(--vc-toast-notifications-progressbar-height);
|
|
background-color: var(--vc-toast-notifications-progressbar-color);
|
|
border-radius: 5px;
|
|
margin-top: auto;
|
|
}
|
|
|
|
.vc-toast-notifications-notification-p {
|
|
margin: 0.5rem 0 0;
|
|
margin-bottom: 3px;
|
|
line-height: 140%;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
/* Container positioning. */
|
|
#vc-toast-notifications-container.vc-toast-notifications-position-bottom-left {
|
|
bottom: var(--vc-toast-notifications-position-offset);
|
|
left: var(--vc-toast-notifications-position-offset);
|
|
}
|
|
|
|
#vc-toast-notifications-container.vc-toast-notifications-position-top-left {
|
|
top: var(--vc-toast-notifications-position-offset);
|
|
left: var(--vc-toast-notifications-position-offset);
|
|
}
|
|
|
|
#vc-toast-notifications-container.vc-toast-notifications-position-top-right {
|
|
top: var(--vc-toast-notifications-position-offset);
|
|
right: var(--vc-toast-notifications-position-offset);
|
|
}
|
|
|
|
#vc-toast-notifications-container.vc-toast-notifications-position-bottom-right {
|
|
bottom: var(--vc-toast-notifications-position-offset);
|
|
right: var(--vc-toast-notifications-position-offset);
|
|
}
|
|
|
|
.visual-refresh .vc-toast-notifications-notification-root {
|
|
background-color: var(--background-base-low);
|
|
} |