Tag dependent character styling

edited November 2016 in Feature Requests

When you put tags on a character/item, they are placed in the .tags-list as <a> elements with a data-tag="[tag]" attribute, this is next to useless for any styling purpose, since the :has css4 selector is not avalible and scripting can't be done on the character/item indexes.

If instead the attributes was placed on the <li> elements which contains the character/item it could be used in custom stylings with the [attribute~=""] selector, this allows for styling your characters depending on the tags provided.

As an example, a character with the tags of "Wizard, Half-Elf, Female" would have the following attribute: data-tags="Wizard Half-Elf Female".

To make for easier total selection you could add a " " to each end for a total of: data-tags=" Wizard Half-Elf Female ".

This would allow you to use [data-tags~=" Wizard "] to select only Wizard, and use [data-tags~=" Half-"] to select both Half-Orc and Half-Elf tags (if you have them).

The reason for the added spaces on both ends is so you can guarantee selecting a specific tag, otherwise [data-tags~="Elf"] would select both the Elf and Half-Elf tags.

In my campaings we use the "Other: Dead" tag for deceased characters, it would be nice if i could throw an overlay or greyscale filter over their image.

Post edited by Phratzz on


  • cgregory
    Posts: 777

    Yeah, definitely would be a nice feature.

    In the meantime, there is a sort of work around that some of us have used for dead characters. Adding an invisible special character to the character's name. For example, when a character dies I add a 0xA0 character to the beginning of the PC/NPC's name. This causes two things, the first it moves the PC/NPC to the bottom of the list alphabetically and secondly it adds that 0xA0 character to the alt attribute of the character's image. This allows me to select to use

    img[alt*=" "]

    to target the character. Now you could easily modify this slightly to assign special characters to the end of a character's name that correspond to "tags" you want, this way the alphabetical order of the character isn't changed.

    Obviously, it would be great if the tags were moved, but hopefully you can use this workaround to accomplish what you want until such a feature is available.

    They are among us!


                       XCom: Defiance - Campaign of the Month November 2016



  • Phratzz
    Posts: 8

    I definitely will, thank you.

Sign In or Register to comment.

January 2022
Lakes of Blood and Ash

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!