#anyway to make inline links look fancy without messing with other links?

19 messages · Page 1 of 1 (latest)

jolly nexus
#

https://thechurchofthestatue.miraheze.org/User:Unit_Mango/citizen.css (code here)

trying to make it so that links are automatically underscored and are filled with the link color when hovered over, and it works fine for regular links in regular wikitext

for some reason, i cant not (note the two 'nots') apply it to things such as buttons, images, the sidebars, and code blocks for whatever reason for the life of me, which screws up how things work

Church of the Statue Wiki

.

random kite
#

If it works fine for regular wikitext links, but you're not trying to apply it to buttons/images/sidebars/etc., then where are you trying to make it work?

shut cape
#

I mean you could do something like <span class="cool-fancy-epic-awesome-link">[[link|display]]</span> then adjust your css rules to be like .cool-fancy-epic-awesome-link > a { ... }

jolly nexus
jolly nexus
#

i think applying the code in the personal css page would give you a good idea of what im trying to do

random kite
#
a:hover {color: var(--color-link--hover) !important;}```
#

That's still going to apply to buttons and stuff but if you want just every link on your wiki to be a certain color, you target a

jolly nexus
#

the issue here is that i dont want to apply it to things like buttons, only wikitext links

random kite
#

then I would suggest either going the not: route, like you seem to be in your personal CSS (probably needs tweaking), or specifying with selectors the links you want to change. For instance, #footer-tagline a {color: var(--color-link);} will change link colors in the footer

#

You can also do it like .citizen-footer__container a {color: var(--color-link);} to apply to the whole footer, not just the tagline

#

Might have to be a combo of both excluding button selectors and including more specific items in the CSS

jolly nexus
#

will try

random kite
#

Most items you'll want to target with CSS can be found with Inspect Element in your browser, which will make it easier

jolly nexus
#

looks like its gonna be a lot of searching around

random kite
#

such is the nature of css 😔

vapid hornet
#

The underline link can be toggled as a user preference. It is under Appearance > Link underlining. Citizen respects that settings by default

#

To target link only, you can use a:where(:not([role='button'])) as selector, that should work most of the time. At least WMF extensions follow that convention

jolly nexus