Changing Div Colors By Style
Closed this issue · 7 comments
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.
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.
Oh, and for a quick live preview of the new version, https://kiwiirc.com/nextclient/
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?
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.
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.
@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.
Got it. Thanks! I can't close this but you can.