Open
Conversation
strager
requested changes
Nov 18, 2021
Collaborator
strager
left a comment
There was a problem hiding this comment.
I like the idea, but not the implementation.
Comment on lines
+170
to
+344
| h4:target::before { | ||
| content: "👉"; /*TODO(😎): localize for different layout directions (e.g. rtl)*/ | ||
| } |
Collaborator
There was a problem hiding this comment.
I think we should add a background to the h4 instead. Maybe rgba(0,0,0,0.1) for light mode and rgba(255,255,255,0.1) for dark mode.
| transition-duration: 333ms; | ||
| transition-timing-function: ease; | ||
| box-shadow: 0 0.8rem 1.0rem 0.1rem rgba(0, 0, 0, 0.2); | ||
| transform: translateY(-0.4rem); |
Collaborator
There was a problem hiding this comment.
I'm very confused about the styling here. It feels very out of place.
- Why a box shadow? It looks uncanny having a shadow surrounding text and extending to the right (in the middle of nowhere).
- Why does the text move location? (I could understand the pointer moving (sliding into view).)
Comment on lines
+174
to
+348
| transition-property: box-shadow, transform; | ||
| transition-duration: 333ms; | ||
| transition-timing-function: ease; |
Collaborator
There was a problem hiding this comment.
Minor: If we have an animation, we should respect prefers-reduced-motion.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Video demonstration:
quick-lint-js_.find.JavaScript.bugs.and.22.more.pages.-.Personal.-.Microsoft.Edge.2021-11-10.20-02-52.mp4
Notes for reviewer:
h4selector may be too broad. A quick grep shows right now there is no leakage, but it may be prudent to add a class to these elements to prevent this behavior showing up in unexpected places in the future