Loading...

Top
PFQ Banner

This is PokéFarm Q, a free online Pokémon collectables game.

Already a user? New to PFQ?

Single post in Site Skins: How-To, and Helpful CSS

Forum Index > PokéFarm > Guides > Site Skins: How-To, and Helpful CSS >

Mirzam's AvatarMirzam
Mirzam's Avatar

QUOTE originally posted by PríncéssPìkà

What part of the trainer card colour change CSS is required to just change the zero-star card colour? And can the border width part be cut out? I wanna check before I (probably) mess it up with pure guesswork.
To affect only the 0-star cards, you would need to use :not() Directly behind each "#trainercard" in the sample code add ":not(.bronze):not(.silver):not(.gold)" Then the code should only affect trainer cards not matching bronze/silver/gold class. For borders, in my experiments with the trainer card code on the first page I found it best to replace the full border property with just border-color, then treat it the same as background-color. This way you don't have to re-define border widths and possibly mess up the alignments of the elements. When testing stuff I prefer to use an add-on like Stylus so I can easily preview my CSS without having to save skin/hard refresh/clear cache all the time.

My sample code

Each definition has a unique color so you can easily tell what's happening. I've removed a lot of stuff I didn't think was needed, like a lot of the !important's and a border definition. #trainercard:not(.bronze):not(.silver):not(.gold)>div.tc-ballicon, #trainercard:not(.bronze):not(.silver):not(.gold)>div.tc-ballicon:before, #trainercard:not(.bronze):not(.silver):not(.gold)>div.tc-header { background-color: #a00; color: yellow; } #trainercard:not(.bronze):not(.silver):not(.gold)>div.tc-name { color: orange; } #trainercard:not(.bronze):not(.silver):not(.gold)>div.tc-joined, #trainercard:not(.bronze):not(.silver):not(.gold)>div.tc-starter, #trainercard:not(.bronze):not(.silver):not(.gold)>div.tc-rank, #trainercard:not(.bronze):not(.silver):not(.gold)>div.tc-sprite, #trainercard:not(.bronze):not(.silver):not(.gold)>div.tc-badges { background-color: black; color: magenta; border-color: white; } #trainercard:not(.bronze):not(.silver):not(.gold):before, #trainercard:not(.bronze):not(.silver):not(.gold)>div.tc-ballicon:after { background-color: green; } #trainercard:not(.bronze):not(.silver):not(.gold)>div.tc-status, #trainercard:not(.bronze):not(.silver):not(.gold) { border-color: cyan; background-color: blue; color: white; }
© PokéFarm 2009-2024 (Full details)Contact | Rules | Privacy | Reviews 4.6★Get shortlink for this page