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 icon to external links #871

Merged
merged 5 commits into from
Jan 2, 2025
Merged

Conversation

LeMurphant
Copy link
Collaborator

fixes #863

There were a few modifications compared to what was done in #346, which Claude says give better compatibility, but @Aprillion LMK if it's wrong

external_icon

@LeMurphant LeMurphant self-assigned this Jan 2, 2025
@LeMurphant
Copy link
Collaborator Author

Unfortunately, I have noticed that in rare cases, the icon can appear after the line-wrap. I was not able to fix this.
line_break

@Aprillion
Copy link
Collaborator

Aprillion commented Jan 2, 2025

Unfortunately, I have noticed that in rare cases, the icon can appear after the line-wrap. I was not able to fix this.

I pushed a commit with position:absolute fix/workaround, feel free to test on https://stampy-ui2.aprillion.workers.dev/questions/6953/Do-people-seriously-worry-about-existential-risk-from-AI and revert if not good for all edge cases.

I also fixed line height of lines with footnotes using <sub> to stay the same as lines without footnotes, because this workaround depends on that:

external icon not wrapping and line height

Aprillion
Aprillion previously approved these changes Jan 2, 2025
@LeMurphant
Copy link
Collaborator Author

@Aprillion your fix works on Firefox (it did not work before), but on Chrome I still get the same result as before.

@Aprillion
Copy link
Collaborator

Aprillion commented Jan 2, 2025

hmm, previous version looked good in Safari too ... maybe Chrome optimized performance of some more reasonable CSS and not for absolutely positioned pseudoelements inside inline line-wrappable parents 🙈

now using a different workaround, to bake in the background directly to the element without :after - but now we can only choose 1 color, I chose the visited link color because it looked better for both unvisited and visited links (while the unvisited color looked strange for visited links) ... feel free to choose another fixed color if this workaround wins

@LeMurphant
Copy link
Collaborator Author

@Aprillion this looks good to me, do you mind re-approving the PR so I can merge?

@LeMurphant LeMurphant merged commit ae8dff6 into master Jan 2, 2025
1 check passed
@LeMurphant LeMurphant deleted the murphant-863-external-links branch January 2, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make internal links clearer
2 participants