Skip to content

Commit 5917504

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 ebaf584 commit 5917504

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
@@ -250,6 +250,18 @@ nav.breadcrumbs ol > li:not(:first-child)::before {
250250
content: "➤ ";
251251
}
252252

253+
/* make "#" selected sections stand out */
254+
h4:target::before {
255+
content: "👉"; /*TODO(😎): localize for different layout directions (e.g. rtl)*/
256+
}
257+
h4:target {
258+
transition-property: box-shadow, transform;
259+
transition-duration: 333ms;
260+
transition-timing-function: ease;
261+
box-shadow: 0 0.8rem 1.0rem 0.1rem rgba(0, 0, 0, 0.2);
262+
transform: translateY(-0.4rem);
263+
}
264+
253265
/* HACK(strager): The '>' symbol pushes some breadcrumbs down for some reason.
254266
This causes vertical misalignment between breadcrumbs. Fix this by tweaking
255267
line-height. I don't know why this works. */

0 commit comments

Comments
 (0)