-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a persistent indicator to link targets #552
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the visuals, but I think there's a better way to realize them (see below).
:not(emu-clause, emu-annex, emu-table, emu-production):target { | ||
text-decoration: wavy underline #FF9800; | ||
text-decoration-skip-ink: none; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
/* add a more subtle persistent indicator to link targets */ | ||
emu-clause:target, emu-annex:target, emu-table:target figure, emu-production:target { | ||
border-left: 0.5em solid #FFC107; | ||
padding-left: 1em; | ||
margin-left: -1em; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the page content jump around... I think it would be better to take advantage of the visual gutter:
/* add a more subtle persistent indicator to link targets */ | |
emu-clause:target, emu-annex:target, emu-table:target figure, emu-production:target { | |
border-left: 0.5em solid #FFC107; | |
padding-left: 1em; | |
margin-left: -1em; | |
} | |
/* add a more subtle persistent indicator to link targets */ | |
emu-clause, emu-annex, emu-table figure, emu-production { | |
position: relative; | |
} | |
emu-clause:target::before, emu-annex:target::before, emu-table:target figure::before, emu-production:target::before { | |
position: absolute; | |
top: 0; | |
height: 100%; | |
/* occupy some of #spec-container's 20px horizontal padding */ | |
left: -18px; | |
width: 9px; | |
background: #FFC107; | |
content: ''; | |
} |
But also note that making sections position: relative
necessitates generalizing Toolbox activation code in js/menu.js: #553
Split from #441, which only gives a temporary highlight to link targets. This is a further enhancement to add a persistent indicator.