discourse/app/assets/stylesheets/common/float-kit/d-toasts.scss
Kris 6169ac2683
UX: make the notification panel consistent with new search panel styles (#32753)
This eliminates menu panel container padding, which gets us a closer
match to the recent search panel adjustments. I've also eliminated the
menu-panel box-shadow variant — if we're not going to use it on the
search panel we should consolidate and eliminate the variance.




Before:

![image](https://github.com/user-attachments/assets/07122788-61a4-4767-a697-47cc3118d84e)


After:

![image](https://github.com/user-attachments/assets/a6f66c6f-37cd-4144-930d-d05546bba801)
2025-05-16 12:50:12 -04:00

58 lines
1 KiB
SCSS
Vendored

@keyframes d-toast-opening {
from {
transform: translateY(var(--transform-y, 10px));
}
}
.fk-d-toasts {
--transform-y: 0;
position: fixed;
top: calc(var(--header-offset) + 0.33rem);
right: 5px;
z-index: z("max");
display: flex;
flex-direction: column;
gap: 5px 0;
flex: 1 1 auto;
.mobile-view & {
left: 5px;
}
.fk-d-toast {
box-sizing: border-box;
opacity: 1;
transition: opacity 0.5s;
border-radius: var(--d-border-radius);
overflow: hidden;
background-color: var(--secondary);
border: 1px solid var(--primary-low);
box-shadow: var(--shadow-dropdown);
overflow-wrap: break-word;
display: flex;
animation: d-toast-opening 0.3s ease-in-out;
will-change: transform;
.desktop-view & {
margin-left: auto;
}
&:hover {
border-color: var(--primary-300);
}
&.-fade-out {
opacity: 0;
}
& + .d-toast {
margin-top: 0.25rem;
}
}
}
@media (prefers-reduced-motion: no-preference) {
.fk-d-toasts {
--transform-y: 2vh;
}
}