Page 1 of 1

More css styles needed

Posted: Saturday 01 October 2016 11:31
by michmis
Hi,

Im currently designing new css theme for domoticz and I find one thing really hard to work with- there are too many things hardcoded. I attached screenshot so I'd like to explain. There is yellow color hardcoded for td element with id name so now css looks like this:

Code: Select all

<table id="itemtablesmall" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td id="name" style="background-color: #DDDF2D;">Pollin</td>
<td id="bigtext">0.0 mm</td>
<td id="img">
<td id="status">0.0 mm</td>
<td id="lastupdate">2016-09-28 17:38:49</td>
</tr>
There are no classes in <tr> tag. Just imagine how useful it would be to give classes so it would look like this instead:

Code: Select all

<table id="itemtablesmall" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr class="weather, norain, connectionlost">
<td id="name">Pollin</td>
<td id="bigtext" class="rain">0.0 mm</td>
<td id="img">
<td id="status">0.0 mm</td>
<td id="lastupdate">2016-09-28 17:38:49</td>
</tr>
with that classes css designers could style every item better way, with no colors hardcoded and also, if there are classes in <tr> element it is easy to style anything inside this specific element.

Re: More css styles needed

Posted: Wednesday 02 November 2016 8:28
by groovy
+1

And not only colors are hardcoded. There is, for example, the text "Last Seen" hardcoded in "style.css", which gets overwritten at every update when I manually change it to reflect my language.

BTW: Is there a simple way to change the date-format from YYYY-MM-DD to, let's say, DD.MM.YYYY?

Re: More css styles needed

Posted: Sunday 06 November 2016 11:47
by stlaha2007
+1

I second that it would be based on IDs and Classes.

For example. Add an id to the Header rows [scene/switch/temp etc] and add that id to style css...

Before last update i modified the index.html and added it myself to hide the header row.

Perhaps in settings an option to enable/disable header rows?

Sent from my D6603 using Tapatalk