Adding a font-awesome icon for external links#767
Open
panglesd wants to merge 1 commit intoocaml:masterfrom
Open
Adding a font-awesome icon for external links#767panglesd wants to merge 1 commit intoocaml:masterfrom
panglesd wants to merge 1 commit intoocaml:masterfrom
Conversation
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.
This is a PR to address Issue #669.
It adds an icon after external links. The icon is taken from here: https://fontawesome.com/v6.0/icons/up-right-from-square (it's the only "external link" icon that is not a Pro icon):
I tried to follow both suggestions: making the svg inline in the css, and using
currentColor. However, this is not that easy: one cannot manipulate the color of an svg pseudo-element that easily.I came up with the following
ugly hacksolution: the svg is a mask, and the background color iscurrentColor.This comes with a price: with both its prefix and unprefixed version, caniuse report that only 95.41% of users have a browser that supports this functionnality. To distinguish between desktop and mobile, its respectively 96.52% and 95.16%.
Here are some details:
For those people, the filter won't work, so instead of the
currentColorexternal link icon, they will have acurrentColorfilled square...How acceptable do you think that is? If that's not acceptable, there are to options:
currentColor. We can use the widely supported (99.95% for desktop)contentproperty. The icon will always be black.currentColor.