aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout/flipping-logo.module.scss
blob: 89b9499bc8a104a34dfc7943d8568e34301b48f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@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);
    }
  }
}