discourse/app/assets/stylesheets/common/float-kit/d-toasts.scss
Joffrey JAFFEUX 08df8fc1d1
UX: enhances chat copy features (#23770)
- Allows to copy quotes from mobile
- Allows to copy text of a message from mobile
- Allows to select messages by clicking on it when selection has started

Note this commit is also now using toasts to show a confirmation of copy, and refactors system specs helpers concerning secondary actions.

<!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in JavaScript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
2023-10-04 16:14:37 +02:00

52 lines
884 B
SCSS

@keyframes d-toast-opening {
0% {
transform: translateX(0px);
}
50% {
transform: translateX(-5px);
}
100% {
transform: translateX(0px);
}
}
.fk-d-toasts {
position: fixed;
top: 5px;
right: 5px;
z-index: z("max");
display: flex;
flex-direction: column;
gap: 5px 0;
.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-menu-panel);
overflow-wrap: break-word;
display: flex;
animation: d-toast-opening 0.5s ease-in-out;
&:hover {
border-color: var(--primary-300);
}
&.-fade-out {
opacity: 0;
}
& + .d-toast {
margin-top: 0.25rem;
}
}
}