-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom.css
More file actions
126 lines (111 loc) Β· 2.93 KB
/
Copy pathcustom.css
File metadata and controls
126 lines (111 loc) Β· 2.93 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
114
115
116
117
118
119
120
121
122
123
124
125
126
/*
==========================================================================
Enhenced abbr element for mobile and keyboard navigation
https://bitsofco.de/making-abbr-work-for-touchscreen-keyboard-mouse/
==========================================================================
*/
abbr[title] {
position: relative;
/* ensure consistent styling across browsers */
text-decoration: underline dotted;
}
abbr[title]:hover::after,
abbr[title]:focus::after {
content: attr(title);
/* position tooltip like the native one */
position: absolute;
left: 0;
bottom: -30px;
width: auto;
white-space: nowrap;
/* style tooltip */
background-color: #1e1e1e;
color: #fff;
border-radius: 3px;
box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.4);
font-size: 14px;
padding: 3px 5px;
}
/*
==========================================================================
Add icons to indicate external links
https://christianoliff.com/blog/styling-external-links-with-an-icon-in-css/
==========================================================================
*/
a svg {
fill: var(--tw-prose-body);
width: 0.6em;
height: 0.6em;
margin-inline-start: 0.25em;
margin-inline-end: 0.25em;
display: inline-block;
}
/*
==========================================================================
Hugo sometimes renders empty p and a tags
==========================================================================
*/
p:empty,
a:empty,
a svg:first-child {
display: none;
}
/*
==========================================================================
Carousel shortcode
https://blog.logrocket.com/modern-css-carousels-no-javascript-required/
==========================================================================
*/
.carousel-scroller {
scroll-snap-type: x mandatory;
scroll-behavior: smooth;
scrollbar-width: none;
scroll-marker-group: after;
position: relative;
}
.carousel-scroller::-webkit-scrollbar {
display: none;
}
.carousel-scroller > figure {
flex: 0 0 100%;
scroll-snap-align: start;
margin-block: 0;
margin-inline: 0 !important;
display: flex;
flex-direction: column;
justify-content: center;
}
.carousel-scroller > figure picture {
display: block;
width: 100%;
}
.carousel-scroller > figure img {
display: block;
width: 100%;
height: auto;
margin-inline: 0;
border-radius: 0.375rem;
}
.carousel-scroller::scroll-marker-group {
display: flex;
justify-content: center;
gap: 0.5rem;
padding: 0.75rem 0;
}
.carousel-scroller > figure::scroll-marker {
content: "";
width: 8px;
height: 8px;
border-radius: 50%;
background: rgb(var(--color-neutral-300));
transition: background-color 0.2s;
}
.dark .carousel-scroller > figure::scroll-marker {
background: rgb(var(--color-neutral-600));
}
.carousel-scroller > figure::scroll-marker:target-current {
background: rgb(var(--color-primary-500));
}
.dark .carousel-scroller > figure::scroll-marker:target-current {
background: rgb(var(--color-primary-400));
}