prawnsalad / KiwiIRC

This is **DEPRECATED**! Please go to https://github.com/kiwiirc/kiwiirc
https://kiwiirc.com
GNU Affero General Public License v3.0
891 stars 277 forks source link

Changing Div Colors By Style #940

Closed spencerthayer closed 7 years ago

spencerthayer commented 7 years ago

Where do the colors come from in elements like #kiwi > div.panels > div > div:nth-child(3) > div > div:nth-child(2) > div.nick? The HTML result being:

<div class="nick" style="color:#972d1a;">[Global]</div>

Adding style to the div is bad practice and I want to change all of these added styles.

prawnsalad commented 7 years ago

The reason it's inline is because the nick colouring is built during runtime depending on the nick so it can't be pre-determined by a css class.

Builds the HTML: https://github.com/prawnsalad/KiwiIRC/blob/master/client/src/views/channel.js#L92

Builds the style: https://github.com/prawnsalad/KiwiIRC/blob/master/client/src/views/channel.js#L259

I should note that if you're looking to improve kiwi, the new version can be found at http://github.com/kiwiirc/kiwiirc and is built much cleaner and modern :) This version is in maintenance mode now as mentioned in the readme.

prawnsalad commented 7 years ago

Oh, and for a quick live preview of the new version, https://kiwiirc.com/nextclient/

spencerthayer commented 7 years ago

I did not know there was a new version of Kiwi! That's great. Why haven't you updated your official website with the new version? Is the new one not quite ready for production use?

spencerthayer commented 7 years ago

In the new version is the nick coloring built during runtime? If so would it be possible to use CSS classes instead? This way we can control colors.

prawnsalad commented 7 years ago

There are a few minor things that need adding yet before it can fully replace the existing version. Mainly translations. The /nextclient/ url is purely there for people that want to try it out and see whats coming before it gets moved to /client/ at some point.

That said - I do need to make a general announcement on kiwiirc.com of the new version ASAP as it is a major rewrite.

prawnsalad commented 7 years ago

@spencerthayer yes they're still generated at runtime, it's the only sane way to go about it. I do want to provide a way for theme authors to adjust the brightness of them though so they can fit better.

spencerthayer commented 7 years ago

Got it. Thanks! I can't close this but you can.