summaryrefslogtreecommitdiff
path: root/sass/components/_tapTarget.scss
blob: 49aecd5610ae0295466150b0ce16816a86966c64 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
.tap-target-wrapper {
  width: 800px;
  height: 800px;
  position: fixed;
  z-index: 1000;
  visibility: hidden;
  transition: visibility 0s .3s;
}

.tap-target-wrapper.open {
  visibility: visible;
  transition: visibility 0s;

  .tap-target {
    transform: scale(1);
    opacity: .95;
    transition:
      transform .3s cubic-bezier(.42,0,.58,1),
      opacity .3s cubic-bezier(.42,0,.58,1);
  }

  .tap-target-wave::before {
    transform: scale(1);
  }
  .tap-target-wave::after {
    visibility: visible;
    animation: pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    transition:
      opacity .3s,
      transform .3s,
      visibility 0s 1s;
  }
}

.tap-target {
  position: absolute;
  font-size: 1rem;
  border-radius: 50%;
  background-color: $primary-color;
  box-shadow: 0 20px 20px 0 rgba(0,0,0,0.14), 0 10px 50px 0 rgba(0,0,0,0.12), 0 30px 10px -20px rgba(0,0,0,0.2);
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0);
  transition:
    transform .3s cubic-bezier(.42,0,.58,1),
    opacity .3s cubic-bezier(.42,0,.58,1);
}

.tap-target-content {
  position: relative;
  display: table-cell;
}

.tap-target-wave {
  &::before,
  &::after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #ffffff;
  }
  &::before {
    transform: scale(0);
    transition: transform .3s;
  }
  &::after {
    visibility: hidden;
    transition:
      opacity .3s,
      transform .3s,
      visibility 0s;
    z-index: -1;
  }

  position: absolute;
  border-radius: 50%;
  z-index: 10001;
}

.tap-target-origin {
  &:not(.btn),
  &:not(.btn):hover {
    background: none;
  }

  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);

  z-index: 10002;
  position: absolute !important;
}

@media only screen and (max-width: 600px) {
  .tap-target, .tap-target-wrapper {
    width: 600px;
    height: 600px;
  }
}