Skip to content

Commit 0d21f29

Browse files
committed
💄 Make :target elements stand out
On a tall monitor (where you can fit the content of the whole screen without scrolling), it can be difficult seeing where a particular in-page link takes you. This commit makes these elements stand out more
1 parent 489ee61 commit 0d21f29

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎website/public/main.css

+12
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,18 @@ nav.breadcrumbs ol > li:not(:first-child)::before {
166166
content: "➤ ";
167167
}
168168

169+
/* make "#" selected sections stand out */
170+
h4:target::before {
171+
content: "👉"; /*TODO(😎): localize for different layout directions (e.g. rtl)*/
172+
}
173+
h4:target {
174+
transition-property: box-shadow, transform;
175+
transition-duration: 333ms;
176+
transition-timing-function: ease;
177+
box-shadow: 0 0.8rem 1.0rem 0.1rem rgba(0, 0, 0, 0.2);
178+
transform: translateY(-0.4rem);
179+
}
180+
169181
@media (prefers-color-scheme: dark) {
170182
a:link {
171183
color: #3398e0;

0 commit comments

Comments
 (0)