-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstyle.css
81 lines (69 loc) · 1.66 KB
/
style.css
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
html,
body {
height: 100%;
width: 100%;
margin: 0;
overflow: auto;
scroll-snap-type: y mandatory;
/* This enables vertical snapping */
}
body {
scroll-padding-top: env(safe-area-inset-top);
/* Adjusts for notches/status bars on mobile devices */
}
.full-height {
min-height: 100vh;
/* This makes the div take up the full viewport height */
width: 100%;
scroll-snap-align: start;
/* This aligns the snap point at the top of the element */
}
/* Ensures smooth scrolling (optional) */
html {
scroll-behavior: smooth;
}
@media screen and (min-width: 320px) {
body,
html {
height: auto;
min-height: 100%;
scroll-snap-type: y mandatory;
/* Ensures snapping on small devices */
}
.full-height {
min-height: calc(100vh - env(safe-area-inset-top));
/* Adjusts full height for small devices */
scroll-snap-align: start;
/* Ensures elements snap correctly */
}
}
@media screen and (min-width: 768px) {
body,
html {
height: auto;
min-height: 100%;
scroll-snap-type: y mandatory;
/* Ensures snapping on tablets */
}
.full-height {
min-height: calc(100vh - env(safe-area-inset-top));
/* Adjusts full height for tablets */
scroll-snap-align: start;
/* Ensures elements snap correctly */
}
}
@media screen and (min-width: 1024px) {
body,
html {
height: auto;
min-height: 100%;
scroll-snap-type: y mandatory;
/* Ensures snapping on desktops */
}
.full-height {
min-height: calc(100vh - env(safe-area-inset-top));
/* Adjusts full height for desktop to account for potential top bars */
scroll-snap-align: start;
/* Ensures elements snap correctly */
}
}