aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/PullToRefresh.css
blob: 15ca74bc2a8e59745ef9700b08b39256ead26ee3 (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
.pull-to-refresh-container {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.pull-to-refresh-indicator {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pull-to-refresh-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--button-background-color);
  color: white;
  transition: all 0.3s ease;
  transform-origin: center;
}

.pull-to-refresh-icon.ready {
  background-color: #28a745;
}

.pull-to-refresh-icon.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pull-to-refresh-text {
  font-size: 0.875rem;
  color: var(--subtitle-color);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

.pull-to-refresh-content {
  height: 100%;
  overflow: auto;
  transition: transform 0.2s ease;
}

/* Disable browser's default pull-to-refresh on mobile */
.pull-to-refresh-content {
  overscroll-behavior-y: contain;
}

@media (hover: hover) {
  /* Hide pull-to-refresh on desktop devices */
  .pull-to-refresh-indicator {
    display: none;
  }
}