diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-10-07 18:44:14 +0200 | 
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:14:41 +0100 | 
| commit | d75b9a1e150ab211c1052fb49bede9bd16320aca (patch) | |
| tree | e5bb221d2b8dc83151697fe646e9194f921b5807 /src/components/molecules/images/flipping-logo.module.scss | |
| parent | 12a03a9a72f7895d571dbaeeb245d92aa277a610 (diff) | |
feat(components): add a generic Flip component
The flipping animation is used at several places so it makes sense to
use a single component to handle the animation. It will avoid styles
duplication.
Diffstat (limited to 'src/components/molecules/images/flipping-logo.module.scss')
| -rw-r--r-- | src/components/molecules/images/flipping-logo.module.scss | 59 | 
1 files changed, 0 insertions, 59 deletions
| diff --git a/src/components/molecules/images/flipping-logo.module.scss b/src/components/molecules/images/flipping-logo.module.scss deleted file mode 100644 index b3b7c96..0000000 --- a/src/components/molecules/images/flipping-logo.module.scss +++ /dev/null @@ -1,59 +0,0 @@ -@use "../../../styles/abstracts/functions" as fun; - -.logo { -  width: var(--logo-size, fun.convert-px(100)); -  height: var(--logo-size, fun.convert-px(100)); -  position: relative; -  border-radius: 50%; -  transform-style: preserve-3d; -  transition: all 0.6s linear 0s; - -  &__front, -  &__back { -    width: 100%; -    height: 100%; -    position: absolute; -    top: 0; -    left: 0; -    backface-visibility: hidden; -    background: var(--color-bg); -    border: fun.convert-px(2) solid var(--color-primary-dark); -    border-radius: 50%; -    transition: all 0.6s linear 0s; - -    svg, -    img { -      // !important is required to override next/image styles... -      padding: fun.convert-px(2) !important; -      border-radius: 50%; -    } -  } - -  &__front { -    box-shadow: fun.convert-px(1) fun.convert-px(2) fun.convert-px(1) 0 -        var(--color-shadow-light), -      fun.convert-px(2) fun.convert-px(3) fun.convert-px(3) 0 -        var(--color-shadow-light); -  } - -  &__back { -    transform: rotateY(180deg); -  } - -  &:hover { -    transform: rotateY(180deg); -  } - -  &:hover & { -    &__front { -      box-shadow: none; -    } - -    &__back { -      box-shadow: fun.convert-px(1) fun.convert-px(2) fun.convert-px(1) 0 -          var(--color-shadow-light), -        fun.convert-px(2) fun.convert-px(3) fun.convert-px(3) 0 -          var(--color-shadow-light); -    } -  } -} | 
