Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions css/elements.css
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,17 @@ table.lightweight-table th {
vertical-align: baseline;
}

/* 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;
}
Comment on lines +772 to +777
Copy link
Contributor

@gibson042 gibson042 Aug 31, 2023

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:

Suggested change
/* 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

:not(emu-clause, emu-annex, emu-table, emu-production):target {
text-decoration: wavy underline #FF9800;
text-decoration-skip-ink: none;
}
Comment on lines +778 to +781
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!


/* diff styles */
ins {
background-color: #e0f8e0;
Expand Down
Loading