Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add classes to chat message so they can be styled/identified by macros/modules or custom CSS #54

Open
mkahvi opened this issue Apr 21, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@mkahvi
Copy link

mkahvi commented Apr 21, 2021

Turn Marker messages currently lack any internal information for what they're for.

I'd like something as follows
<div class='turn-marker'> to wrap all the content
Same div should have something like data-actor-id="actorID" just because.

<p>PLAYER NAME</p> should include class='user' or similar.

and the <em>Turn Marker</em>... I don't know removed or add class='note' or something?

This would allow at minimum for example custom CSS to be used to alter the appearance of the message instead of current state of it being indistinguishable from any other chat message.

@kckaiwei kckaiwei added the enhancement New feature or request label May 1, 2021
@kckaiwei
Copy link
Owner

kckaiwei commented May 1, 2021

Yeah, I like this idea a lot! Do you have an example of a module that utilizes this custom css, so I know what kind of classes/ids they would be looking for? I haven't really looked at those modules yet, and could use an example.

@kckaiwei kckaiwei changed the title Add classes to chat message so they can be styled/identified by macros/modules or custom CSS [FEATURE] Add classes to chat message so they can be styled/identified by macros/modules or custom CSS May 1, 2021
@mkahvi
Copy link
Author

mkahvi commented May 2, 2021

It's mostly for players doing something via Custom CSS module. So it doesn't need to be anything too specific.

I honestly would imagine most other instances are more personal modules to customize their game in particular ways (homebrew mods, essentially), or micro modules that enhance other features. For example, if the actor ID is included, I could make a micro module that adds functionality to the existing card instead of printing a separate card since it would have sufficient info to build more from.

Regardless, at minimum it needs a class name for the top level element to identify the entire thing as belonging to your module. Optimally major sub elements would have class names also as described in the original post to allow more reliable manipulation of the card with CSS or otherwise.

@kckaiwei
Copy link
Owner

kckaiwei commented May 2, 2021

Yeah, that's not a problem at all, I'll whip something up for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants