Skip to content

A platform for community discussion. Free, open, simple.

DEV: merge post-action-feedback CSS into common file (#34080)

Kris37ebaf4c3c71
diff --git a/app/assets/stylesheets/common/post-action-feedback.scss b/app/assets/stylesheets/common/post-action-feedback.scss
index 7a8d2d1c774..2765ae29f31 100644
--- a/app/assets/stylesheets/common/post-action-feedback.scss
+++ b/app/assets/stylesheets/common/post-action-feedback.scss
@@ -36,3 +36,42 @@
}
}
}
+
+.post-action-feedback-alert {
+ position: absolute;
+ top: -1.5rem;
+ left: 60%;
+ transform: translateX(-50%);
+ color: var(--success);
+ padding: 0.25rem 0.5rem;
+ white-space: nowrap;
+ font-size: var(--font-down-2);
+ opacity: 0;
+ z-index: calc(z("timeline") + 1);
+}
+
+.--transition {
+ .post-action-feedback-alert,
+ .post-action-feedback-svg {
+ transition:
+ opacity 0.25s,
+ color 0.25s;
+ }
+}
+
+.--activated {
+ .post-action-feedback-alert,
+ .post-action-feedback-svg {
+ opacity: 1;
+ }
+
+ .post-action-feedback-alert {
+ &.-success {
+ color: var(--success);
+ }
+
+ &.-fail {
+ color: var(--danger);
+ }
+ }
+}
diff --git a/app/assets/stylesheets/desktop/_index.scss b/app/assets/stylesheets/desktop/_index.scss
index c0a81e5e217..19fd454168e 100644
--- a/app/assets/stylesheets/desktop/_index.scss
+++ b/app/assets/stylesheets/desktop/_index.scss
@@ -2,7 +2,6 @@
@import "latest-topic-list";
@import "login-signup-page";
@import "modal";
-@import "post-action-feedback";
@import "topic";
@import "topic-list";
@import "topic-post";
diff --git a/app/assets/stylesheets/desktop/post-action-feedback.scss b/app/assets/stylesheets/desktop/post-action-feedback.scss
deleted file mode 100644
index 71a9204ae4a..00000000000
--- a/app/assets/stylesheets/desktop/post-action-feedback.scss
+++ /dev/null
@@ -1,38 +0,0 @@
-.post-action-feedback-alert {
- position: absolute;
- top: -1.5rem;
- left: 60%;
- transform: translateX(-50%);
- color: var(--success);
- padding: 0.25rem 0.5rem;
- white-space: nowrap;
- font-size: var(--font-down-2);
- opacity: 0;
- z-index: calc(z("timeline") + 1);
-}
-
-.--transition {
- .post-action-feedback-alert,
- .post-action-feedback-svg {
- transition:
- opacity 0.25s,
- color 0.25s;
- }
-}
-
-.--activated {
- .post-action-feedback-alert,
- .post-action-feedback-svg {
- opacity: 1;
- }
-
- .post-action-feedback-alert {
- &.-success {
- color: var(--success);
- }
-
- &.-fail {
- color: var(--danger);
- }
- }
-}
diff --git a/app/assets/stylesheets/mobile/_index.scss b/app/assets/stylesheets/mobile/_index.scss
index f2d426806b9..f14d733ac8e 100644
--- a/app/assets/stylesheets/mobile/_index.scss
+++ b/app/assets/stylesheets/mobile/_index.scss
@@ -1,6 +1,5 @@
@import "login-signup-page";
@import "modal";
-@import "post-action-feedback";
@import "push-notifications-mobile";
@import "topic-list";
@import "topic-post";
diff --git a/app/assets/stylesheets/mobile/post-action-feedback.scss b/app/assets/stylesheets/mobile/post-action-feedback.scss
deleted file mode 100644
index 40b3ab01f5b..00000000000
--- a/app/assets/stylesheets/mobile/post-action-feedback.scss
+++ /dev/null
@@ -1,39 +0,0 @@
-@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(--content-border-color);
- box-shadow: var(--shadow-dropdown);
- 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;
- }
-}