summaryrefslogtreecommitdiff
path: root/_sass/misc/click-to-top.scss
blob: 56b67cf62a1a197b2349c755601d3aa811676d56 (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
.click-to-top {
  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;
  transition: 0.3s;
  z-index: 10;

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

.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;
  }
}