Page 1 of 1

Change CSS for whole off block

Posted: Sunday 14 April 2019 20:15
by HansieNL
@Lokonli :
I'm trying to change the color of the title and state if a block has the off state.

Code: Select all

/* State Off */
.col-data .off {
    color: #6A6A6A !important;
}
Image
The title is still an other color. Can you tell me how to change the title?

Re: Change CSS for whole off block

Posted: Sunday 14 April 2019 21:30
by Lokonli
HansieNL wrote: Sunday 14 April 2019 20:15 @Lokonli :
I'm trying to change the color of the title and state if a block has the off state.

Code: Select all

/* State Off */
.col-data .off {
    color: #6A6A6A !important;
}
Image
The title is still an other color. Can you tell me how to change the title?
The `.off` and '.on' classes as only applied to the icon part.
If you want to change colors of other parts based on the device state you have to use a custom function in custom.js.

See https://dashticz-v2.readthedocs.io/en/l ... custom-jss

You could use a getStatus_IDX(idx,value,device) function.

Re: Change CSS for whole off block

Posted: Monday 15 April 2019 22:11
by Lokonli
HansieNL wrote: Sunday 14 April 2019 20:15 @Lokonli :
I'm trying to change the color of the title and state if a block has the off state.

Code: Select all

/* State Off */
.col-data .off {
    color: #6A6A6A !important;
}
Image
The title is still an other color. Can you tell me how to change the title?
Check this:
https://dashticz-v2.readthedocs.io/en/l ... getdevices

Re: Change CSS for whole off block

Posted: Tuesday 16 April 2019 1:28
by HansieNL
Thx a lot. Saves me a lot of coding this way!