I've noticed something odd about the way Chrome and Edge render text-shadows on hyperlinks.
For example, I have a situation where I apply two text-shadows to several paragraph elements. One of these paragraphs is only a standard hyperlink with text-decoration: underline;
. Here's the HTML and CSS:
<p class="header__text">
<a href="https://google.com">See the 2021 edition ...</a>
</p>
.header__text {
color: #fff;
text-shadow: 2px 2px 2px #000, 1px 1px 24px #000;
padding-left: 16px;
padding-right: 16px;
}
a {
color: #c62828;
}
This renders the way I would expect in Safari and Firefox (Mac and PC), with the shadow completely underneath the text and the underline.
But in Chrome (Mac and PC) and Edge, the text-shadow falls under the text, but over the hyperlink's underline.
I don't understand why the shadow behaves like this in those two browsers. Is this just a bug? Is there some Blink-specific property I should override to stop this behavior?