AxelChat icon indicating copy to clipboard operation
AxelChat copied to clipboard

Unique Class Names for CSS

Open last7studios opened this issue 1 year ago • 3 comments

Hello,

Is there a chance you can have each class inside the messages span have an additional unique class added to them?

<span class="message">
    <span class="badges"><img class="" alt="" src=""></span>
    <span class="authorName">Username</span>
    <span class="text **colon**">: </span>
    <span class="text **message-words**">Message Goes Here</span>
</span>

or something similar? It would make it easier to stylize from within OBS or other software.

last7studios avatar Jul 24 '24 13:07 last7studios

I'll try to do something similar in the next updates

3dproger avatar Jul 24 '24 18:07 3dproger

How about this?

<span class="message">
  <span class="badges"><img class="badgeServiceIcon" alt="" src=""></span>
  <span class="authorName">Username</span>
  <span class="text">Message Goes Here</span>
</span>

By default, the CSS will add a prefix : to the message text:

.text::before {
  content: ": ";
}

I think in your custom CSS you will be able to specify your own prefix or even hide it

3dproger avatar Jul 25 '24 15:07 3dproger

The previous version was wrong. Here is a new improved version:

<span class="message">
	<span class="badges">
		<img class="badgeServiceIcon" alt="" src="">
	</span>
	
	<span class="authorName">Username</span>
	
	<span class="authorMessageContentSeparator"></span>
	
	<span class="messageContents">
		<span class="text">Message text 1</span>
		
		<span class="text">Message text 2</span>
		
		<span class="image"><img class="imageContent" alt="" src="some_image_url"></span>
		
		<span class="text">Message text 3</span>
		
		<span>
			<a class="hyperlinkContent" href="some_link_url"><span>some link text</span></a>
		</span>
	</span>
</span>

CSS:

.authorMessageContentSeparator::before {
  content: ": ";
}

3dproger avatar Jul 26 '24 06:07 3dproger