mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: allow styling of feedback on mobile (#25072)
(to test try using discourse-ai which displays feedback on mobile) --------- Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
This commit is contained in:
parent
406f4c9e80
commit
baa7c4cec7
@ -20,3 +20,4 @@
|
|||||||
@import "common/float-kit/_index";
|
@import "common/float-kit/_index";
|
||||||
@import "common/login/_index";
|
@import "common/login/_index";
|
||||||
@import "common/table-builder/_index";
|
@import "common/table-builder/_index";
|
||||||
|
@import "common/post-action-feedback";
|
||||||
|
@ -1,44 +1,10 @@
|
|||||||
@keyframes slide {
|
|
||||||
0% {
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
transform: translateY(100%) translateX(-50%);
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-action-feedback-alert {
|
|
||||||
position: absolute;
|
|
||||||
top: -1.5rem;
|
|
||||||
left: 50%;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
color: var(--success);
|
|
||||||
padding: 0.25rem 0.5rem;
|
|
||||||
white-space: nowrap;
|
|
||||||
font-size: var(--font-down-2);
|
|
||||||
opacity: 1;
|
|
||||||
transition: opacity 0.5s ease-in-out;
|
|
||||||
z-index: z("modal", "popover");
|
|
||||||
&.-success {
|
|
||||||
color: var(--success);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.-fail {
|
|
||||||
color: var(--danger);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.slide-out {
|
|
||||||
animation: slide 1s cubic-bezier(0, 0, 0, 2) forwards;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes draw {
|
@keyframes draw {
|
||||||
to {
|
to {
|
||||||
stroke-dashoffset: 0;
|
stroke-dashoffset: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-menu-area {
|
.post-controls {
|
||||||
.post-action-feedback-button {
|
.post-action-feedback-button {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
@ -12,7 +12,7 @@
|
|||||||
@import "modal";
|
@import "modal";
|
||||||
@import "topic-list";
|
@import "topic-list";
|
||||||
@import "topic-post";
|
@import "topic-post";
|
||||||
@import "post-action-menu";
|
@import "post-action-feedback";
|
||||||
@import "topic";
|
@import "topic";
|
||||||
@import "upload";
|
@import "upload";
|
||||||
@import "user";
|
@import "user";
|
||||||
|
24
app/assets/stylesheets/desktop/post-action-feedback.scss
Normal file
24
app/assets/stylesheets/desktop/post-action-feedback.scss
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
.post-action-feedback-alert {
|
||||||
|
position: absolute;
|
||||||
|
top: -1.5rem;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
color: var(--success);
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: var(--font-down-2);
|
||||||
|
opacity: 1;
|
||||||
|
transition: opacity 0.5s ease-in-out;
|
||||||
|
z-index: z("modal", "popover");
|
||||||
|
&.-success {
|
||||||
|
color: var(--success);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.-fail {
|
||||||
|
color: var(--danger);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.slide-out {
|
||||||
|
animation: slide 1s cubic-bezier(0, 0, 0, 2) forwards;
|
||||||
|
}
|
||||||
|
}
|
@ -23,6 +23,7 @@
|
|||||||
@import "modal-overrides";
|
@import "modal-overrides";
|
||||||
@import "new-user";
|
@import "new-user";
|
||||||
@import "personal-message";
|
@import "personal-message";
|
||||||
|
@import "post-action-feedback";
|
||||||
@import "push-notifications-mobile";
|
@import "push-notifications-mobile";
|
||||||
@import "reviewables";
|
@import "reviewables";
|
||||||
@import "search";
|
@import "search";
|
||||||
|
40
app/assets/stylesheets/mobile/post-action-feedback.scss
Normal file
40
app/assets/stylesheets/mobile/post-action-feedback.scss
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
@keyframes d-toast-opening {
|
||||||
|
from {
|
||||||
|
transform: translateY(var(--transform-y, 10px));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-action-feedback-alert {
|
||||||
|
--transform-y: 0;
|
||||||
|
|
||||||
|
position: fixed;
|
||||||
|
top: calc(var(--header-offset) + 0.5rem);
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin-inline: 0.5rem;
|
||||||
|
z-index: z("max");
|
||||||
|
display: flex;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 1em 1.5em;
|
||||||
|
opacity: 1;
|
||||||
|
transition: opacity 0.5s;
|
||||||
|
border-radius: var(--d-border-radius);
|
||||||
|
color: var(--primary);
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: var(--tertiary-very-low);
|
||||||
|
border: 1px solid var(--primary-low);
|
||||||
|
box-shadow: var(--shadow-menu-panel);
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
animation: d-toast-opening 0.3s ease-in-out;
|
||||||
|
will-change: transform;
|
||||||
|
|
||||||
|
&.-fade-out {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: no-preference) {
|
||||||
|
.post-action-feedback-alert {
|
||||||
|
--transform-y: 2vh;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user