@molly0xfff A valid wish.
Here is a chaotic evil way to "solve" it 😺
@molly0xfff Try adding:
```css
a.wikipedia-link::after {
/* … */
content: " "; /* However many spaces you need */
white-space: pre;
}
@knowler the ::after is what's holding the SVG:
```css
a[href^="https://en.wikipedia.org/"]::after
{
content: url("/assets/images/wikipedia.svg");
display: inline-block;
width: 0.8em;
margin-left: 0.25rem;
}
```
@molly0xfff You might be able to mix text with the image?
```css
content: " " url("/assets/images/wikipedia.svg") " ";
```
@molly0xfff Alright, solution is here: https://knowler.dev/demos/SDgpyGc?codepen
This uses the `::after` with some preserved whitespace to extend the underline, then instead of using `content` to set the image, I set the icon as the `background-image` of that same pseudo-element.
@knowler @molly0xfff Yes, as soon an image is in the content, the underline is not working anymore. But it's puzzling, because using pure text in 'content' works for the underline... Eg.
a::after {
content: " ʷ";
font-weight: bold;
color: grey;
}
(unfortunately, it's not the same iconic 'W' font/logo. Maybe it could work with writing it with an appropriate webfont?)
@davidrevoy @knowler @molly0xfff I think that makes sense, actually—"text-decoration" applying to only things that the browser considers text.
So If you used an icon font… [ducks]
@molly0xfff It's possible by setting a unicode character (fallback) in the CSS content, then style it with a custom webfont (e.g. convert the SVG with IcoMoon).
That's how I manage such link indicators in my personal website, although I move them to the right gutter instead of inline. Example: https://heracl.es/geary/
The *filesize difference versus an SVG is negligible. Of course, opinions may vary between what's good practice between icon fonts and SVGs.
@molly0xfff what I want for Christmas is SVG supporting embedding g/view into text/tspan as a character. So we can have something like this:
```svg
<tspan>Some text <view viewBox="..."><!-- some image here --></view> rest of the text</tspan>
```
To embed emoji, logo or other visual stuff in text within SVG. And don't positioning it with coordinates and hope it would be ok.