aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/forms/flipping-label.module.scss
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-24 16:05:03 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-24 16:05:03 +0200
commite1cc2de22fc703d94e1151beb9526d8cbe0e49c1 (patch)
treecffd9ada0c418d5e9fb02236c4a7bc050f4c0208 /src/components/molecules/forms/flipping-label.module.scss
parent525ea4c39c4965d9f6f7941cf203e56190d0ec1c (diff)
chore(toolbar): change icons to close button when activated
Diffstat (limited to 'src/components/molecules/forms/flipping-label.module.scss')
-rw-r--r--src/components/molecules/forms/flipping-label.module.scss63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/components/molecules/forms/flipping-label.module.scss b/src/components/molecules/forms/flipping-label.module.scss
new file mode 100644
index 0000000..e650ebe
--- /dev/null
+++ b/src/components/molecules/forms/flipping-label.module.scss
@@ -0,0 +1,63 @@
+@use "@styles/abstracts/functions" as fun;
+
+.label {
+ display: block;
+ width: var(--btn-size, #{fun.convert-px(60)});
+ height: var(--btn-size, #{fun.convert-px(60)});
+}
+
+.front,
+.back {
+ display: flex;
+ place-content: center;
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ right: 0;
+ backface-visibility: hidden;
+ transition: all 0.6s ease-in 0s;
+}
+
+.front {
+ z-index: 20;
+}
+
+.back {
+ z-index: 10;
+}
+
+.wrapper {
+ --icon-size: 60%;
+
+ display: flex;
+ place-content: center;
+ place-items: center;
+ width: 100%;
+ height: 100%;
+ position: relative;
+ transition: all 0.5s ease-in-out 0s;
+ transform-style: preserve-3d;
+
+ &--active {
+ transform: rotateY(180deg);
+
+ .front {
+ transform: scale(0.2);
+ }
+
+ .back {
+ transform: scale(1) rotateY(180deg);
+ }
+ }
+
+ &--inactive {
+ .front {
+ transform: scale(1);
+ }
+
+ .back {
+ transform: scale(0.2) rotateY(180deg);
+ }
+ }
+}