Skip to content

Commit da9e522

Browse files
committed
scss: be more specific with :target highlight and its children
Turns out that pseudo-classes need a selector. Yeah, that took me a bit to figure out. Given that we really only care about tr:target, specify the rule to be just about tr:target. I also noticed that sometimes the background colour is doubled, making it look a bit weird. Just applying to the td children makes that go away, too. Signed-off-by: Luca Zeuch <[email protected]>
1 parent 49edcc8 commit da9e522

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

assets/scss/common/_custom.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ a.broken {
99
text-decoration: underline;
1010
}
1111

12-
:target {
13-
scroll-margin-top: 10rem;
14-
* {
12+
tr:target {
13+
scroll-margin-top: 10rem !important;
14+
td {
1515
// slightly transparent yellow
1616
background: rgba(255, 255, 0, 0.3);
1717
}

0 commit comments

Comments
 (0)