-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
91 lines (74 loc) · 2.13 KB
/
styles.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
82
83
84
85
86
87
88
89
90
91
@import "tailwindcss";
.htmx-indicator {
opacity: 0;
transition: opacity 500ms ease-in;
}
.htmx-request .htmx-indicator {
opacity: 1;
}
.htmx-request.htmx-indicator {
opacity: 1;
}
.year-indicator {
@apply sticky top-0 z-20;
}
.month-indicator {
@apply sticky top-12 lg:top-29 z-10;
}
.year {
@apply block text-3xl lg:text-7xl font-mono text-transparent lg:absolute lg:top-3 -left-52 [-webkit-text-stroke-color:_rgba(163_163_163/1)] dark:[-webkit-text-stroke-color:_rgba(82_82_82/1)] z-20 bg-white dark:bg-neutral-900 py-2 lg:py-4 focus-visible:outline-1 focus-visible:outline-dashed focus-visible:outline-neutral-400 dark:focus-visible:outline-neutral-600 focus-visible:rounded-xs;
-webkit-text-stroke-width: 2px;
}
.month {
@apply text-lg lg:text-xl lg:absolute lg:-top-2 -left-49 z-10 bg-white dark:bg-neutral-900 py-1 lg:w-40 lg:text-right text-neutral-400 dark:text-neutral-700;
}
.month-indicator + li {
@apply -mt-3 lg:-mt-6;
}
.year-indicator + .month-indicator {
@apply -mt-6 lg:mt-0;
}
/* Scroll driven animation to fade in date indicators
* Note that the order of the properties seems to be important here,
* animation needed to be before animation-timeline.
* */
@media (prefers-reduced-motion: no-preference) and (min-width: 1024px) {
@supports (animation-range: 0 50vh) {
.year,
.month {
opacity: 0;
transform: translateY(50px);
animation: fade-in linear forwards;
animation-timeline: view();
/* Start at 0px (when it comes into view), end at half the screen height */
animation-range: 0 50vh;
}
@keyframes fade-in {
to {
opacity: 1;
transform: translateY(0);
}
}
}
}
@supports (anchor-name: --myanchor) {
[popover] {
@apply m-1 border-none hidden opacity-0;
transition:
opacity 500ms,
display 500ms allow-discrete,
overlay 500ms allow-discrete;
&:popover-open {
@apply block opacity-100;
@starting-style {
opacity: 0;
}
}
}
}
/* TODO: Remove once Safari and Firefox supports it */
@supports not (anchor-name: --myanchor) {
[popovertarget] {
pointer-events: none;
}
}