I have a card layout where all cards are made clickable with a link using the bootstrap stretched-link class. However, I also added text to the anchor for SEO purposes, even though it doesn't make sense in a card layout. I wanted to hide the text while still benefiting from SEO advantages.
Here lies the issue:
Previously, I used to set the font-size of the anchor text to 0 to hide it. But in this case, it seems to interfere with the ::after selector, and I'm unsure why.
Does anyone know of a CSS hack to hide the anchor text but keep the stretched link functionality working?
This is what the stretched-link does:
.stretched-link::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
content: "";
}