-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
113 lines (100 loc) · 2.14 KB
/
styles.css
File metadata and controls
113 lines (100 loc) · 2.14 KB
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
104
105
106
107
108
109
110
111
112
113
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: rgb(6, 102, 167); /* Tailwind: blue-700 */
/* Slate */
--slate-50: rgb(248, 250, 252);
--slate-100: rgb(241, 245, 249);
--slate-200: rgb(226, 232, 240);
--slate-300: rgb(203, 213, 225);
--slate-400: rgb(148, 163, 184);
--slate-500: rgb(100, 116, 139);
--slate-600: rgb(71, 85, 105);
--slate-700: rgb(51, 65, 85);
--slate-800: rgb(30, 41, 59);
--slate-900: rgb(15, 23, 42);
}
body {
padding: 2em;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
background-color: var(--slate-900);
}
.carousel {
width: 100%;
overflow-x: auto;
margin: 3em auto;
display: flex;
gap: 2em;
scroll-behavior: smooth;
anchor-name: --carousel;
scroll-snap-type: x mandatory;
scroll-marker-group: after;
}
.carousel::-webkit-scrollbar {
display: none;
}
.carousel::scroll-marker-group {
display: flex;
justify-content: center;
gap: 0.5em;
}
.card::scroll-marker {
content: " ";
height: 1em;
width: 1em;
background-color: var(--primary-color);
border-radius: 50%;
}
.card::scroll-marker:target-current {
background-color: var(--slate-100);
}
.carousel::scroll-button(left),
.carousel::scroll-button(right) {
content: "←";
border: none;
background-color: var(--primary-color);
font-family: Consolas;
font-size: 3rem;
color: white;
height: 60px;
width: 60px;
border-radius: 50%;
padding-bottom: 0.1em;
cursor: pointer;
position: fixed;
position-anchor: --carousel;
position-area: left center;
translate: 50%;
}
.carousel::scroll-button(right) {
content: "→";
position-anchor: --carousel;
position-area: right center;
translate: -50%;
}
/* End of Cards / Disabled */
.carousel::scroll-button(left):disabled,
.carousel::scroll-button(right):disabled {
opacity: 0.5;
cursor: auto;
}
.card {
flex: 0 0 20em;
/* height: 12em; oder */
aspect-ratio: 5 / 3;
background-color: var(--primary-color);
padding: 1em;
border-radius: 0.5em;
text-align: center;
color: white;
align-content: center;
scroll-snap-align: start;
}
@media (max-width: 500px) {
.card {
flex: 0 0 100%;
}
}