summaryrefslogtreecommitdiff
path: root/_sass/misc/click-to-top.scss
blob: 84495aa533070ead7839ece8a8914813299c66ed (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
.click-to-top {
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  width: 64px;
  height: 64px;
  border-radius: 32px;
  right: 60px;
  bottom: 48px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
  font-size: 24px;
  user-select: none;

  @include media-query(1024px) {
    width: 48px;
    height: 48px;
    border-radius: 24px;
    right: 35px;
    font-size: 20px;
  }

  @include media-query($on-palm) {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    right: 20px;
    font-size: 16px;
  }
}

.click-to-top.show {
  opacity: 1;
  transform: translateY(0);
}

html[data-theme="light"] {
  .click-to-top {
    background-color: $click-to-top-light-background-color;
    color: $click-to-top-light-color;
  }
}

html[data-theme="dark"] {
  .click-to-top {
    background-color: $click-to-top-dark-background-color;
    color: $click-to-top-dark-color;
  }
}