128 lines
2.3 KiB
CSS
128 lines
2.3 KiB
CSS
@layer components {
|
|
.notification {
|
|
position: relative;
|
|
}
|
|
|
|
.notification-tray {
|
|
inset: auto var(--inline-space) var(--block-space-half) auto;
|
|
|
|
.notification {
|
|
&:nth-child(1n + 7) { display: none; }
|
|
}
|
|
}
|
|
|
|
.notification-tray__actions {
|
|
.notification-tray:not(:has(.notification)) & {
|
|
.notification-tray__all_action {
|
|
--btn-border-radius: 50%;
|
|
--btn-padding: 0;
|
|
|
|
aspect-ratio: 1;
|
|
block-size: var(--btn-size);
|
|
display: grid;
|
|
inline-size: var(--btn-size);
|
|
place-items: center;
|
|
|
|
> * {
|
|
grid-area: 1/1;
|
|
}
|
|
|
|
span {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.notification-tray__read_action {
|
|
visibility: hidden;
|
|
}
|
|
}
|
|
}
|
|
|
|
.notification__content {
|
|
--border-color: transparent;
|
|
--border-radius: 0.2em;
|
|
--padding: 0.75em 0.5em;
|
|
|
|
padding: var(--padding);
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
--border-color: var(--color-ink-medium);
|
|
}
|
|
|
|
.notificiations-list--read & {
|
|
--border-color: var(--color-ink-lighter);
|
|
|
|
box-shadow: none !important;
|
|
}
|
|
}
|
|
|
|
.notification__title {
|
|
padding-inline-end: calc(var(--inline-space-half) + 1.2em);
|
|
}
|
|
|
|
.notification__unread_indicator {
|
|
--btn-background: var(--color-canvas);
|
|
--btn-border-color: var(--color-canvas);
|
|
--btn-icon-size: 0.7em;
|
|
--btn-padding: 0;
|
|
--btn-size: 1.75em;
|
|
--hover-size: 0;
|
|
|
|
inset: 0 0 auto auto;
|
|
position: absolute;
|
|
|
|
&:before,
|
|
.icon {
|
|
transition: opacity 150ms ease;
|
|
}
|
|
|
|
/* The red dot */
|
|
&:before {
|
|
aspect-ratio: 1;
|
|
background-color: var(--color-marker);
|
|
border-radius: 50%;
|
|
content: "";
|
|
inline-size: 0.55em;
|
|
inset: 50% auto auto 50%;
|
|
position: absolute;
|
|
translate: -50% -50%;
|
|
}
|
|
|
|
.icon {
|
|
opacity: 0;
|
|
}
|
|
|
|
@media (hover: hover) {
|
|
&:hover {
|
|
--btn-background: transparent;
|
|
|
|
&:before {
|
|
opacity: 0;
|
|
}
|
|
|
|
.icon {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
.notificiations-list--read & {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.notifications__empty-message {
|
|
.notificiations-list:has(.notification) & {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.notificiations-list--read {
|
|
display: none;
|
|
|
|
&:has(.notification) {
|
|
display: flex;
|
|
}
|
|
}
|