Restore functionality for external link indicators #678
+71
−3
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.
#162 and #163 had previously added an external link indicator icon to the theme, which was later reverted in #269 due to discussion in ##233 (comment), where it was pointed out that it was broken for dark mode and there were some questions around how to style SVGs. Also, it was mentioned that this functionality was not being used in the websites that use the theme. However, we had enabled it downstream and it caught my eye on a routine visit recently. I've put forward in this PR a more correct implementation for external link indicators, drawing from how the PyData Sphinx Theme does it.
This also works with light and dark mode, the rationale being that the
::afterpseudo-element doesn't explicitly set acolorproperty and inherits it from the parent – wherein, in this case, we have--pst-color-text-baseand--pst-color-link-hoverthat are defined with different values for light and dark mode already.cc: @stefanv
Here are some screenshots for your reference: