#Name color change

29 messages · Page 1 of 1 (latest)

open flint
#

So I’m trying to add a gradient to my name with MediaWiki:Common.css, but it won’t work. How would I fix this? Link pending. @lone lily

#

[[mh:darkwitch:MediaWiki:Common.css]]

lone lilyBOT
drifting dragon
#

Snippet of current code
a[href="/wiki/User:Blad"], a[href="https://darkwitch.miraheze.org/wiki/User:Blad"] { font-family: "Roboto Mono", monospace; background:linear-gradient(#ff00ff,#c800c8,purple,#c800c8,#ff00ff); -webkit-background-clip:text; font-weight: bold; }

#

i'll check

#

i should have a gradient

#

huh

#

works for me, try clearing you cache

#

oh wait the gradient is missing

#

ugh

umbral pier
#

It works correctly, but because it uses the background to add a gradient, the original link text covers it. Simply add color: transparent; to the code above and it works! pupCoffeeMH

open flint
drifting dragon
#

so yea

open flint
#

Okay, just saved it

#

Seems like it works, thank you

drifting dragon
#

top 10 reasons why i hate css

umbral pier
#

I can't think of any reason why it'd behave like that, unless you added the transparent CSS first and then went to add the gradient

open flint
#

Still blank

#

I used color after background

umbral pier
#

Hm, I'll take a look. Order of different css stylings shouldn't matter

#

Strange, works perfectly for me on Chrome

#

Is it also transparent in Recent Changes?

#

Oh I see why. The nickname in the top bar has a span inside

#

kk I think I found a fix! change the selector to

a[href="/wiki/User:Blad"]:not(#pt-userpage), 
a[href="https://darkwitch.miraheze.org/wiki/User:Blad"]:not(#pt-userpage)
umbral pier
#

Also an alternate way of selecting links to users I use for my wiki: (of course add the :not(#pt-userpage) if you want to use it)

a[href$=":Blad"],
a[href$="/Blad"] 

It doesn't require to type the full url every time. Found it in a CSS cookbook on a fandom wiki

#

Haven't tested but it could trigger on a subpage that shares a name with a user, so not sure if it's an upgrade or not haha