Hi, I have created an external link icon style for my external links. However, I want to be able to exclude certain selected external links from having this style applied. And that’s what I can’t figure out…
There’s no specific criteria, it’s just that some links I don’t want to have this style applied to and I like to be able to add a class to them that removes that default external style from them
Ah ok, but that’s not what I want to do, I want to be able to assign a class to an external link that will then remove the external link icon that’s normally added to external links.
You could use Ralphs targetted CSS to then override the icon and set background-image:none;.
If you literally want another class on there, then you can’t do that dynamically in CSS> However you can just find what links you need to target and override it.
Sounds like a pretty long-winded way to do something pretty simple to me.
Perhaps you need to describe in more detail how you envisage this working. Are you picturing some kind of CMS setup where you add a link and click a button to set the styling? I just can’t quite understand what you are trying to do here (from a practical standpoint).
As said, you can get the end result you want with CSS alone. If you want something more sophisticated, like adding classes etc., then you might need to turn to JS or a backend solution.