so I'm editing this FANDOM wiki.
I have this element here:
<h1 class="page-header__title">Captain</h1>
As you can see "Captain" would be the article's name from the Wiki. Every article has their own subdomain link and will make the inner text of this element different.
Is there anyway I could simply only change the element's CSS if the inner Text equals Captain?
Hopefully you know what I'm trying to accomplish.
Here is a example of what I'm trying to accomplish:
.edit-info-user a[href$="/wiki/User:Potato"]::Before {
content: "( Bureaucrat ) ";
font-size: 9px;
color: #f00;
letter-spacing: 0.5px;
}
As you can see, this would only tamper with the element's CSS if the link equals "/wiki/User:Potato".