1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-11-21 22:50:55 +00:00
ESPUI/data
Ian Gray ec1862cfe6 Support for dynamic custom inline styling.
Adds two functions in ESPUI.h:
setPanelStyle()
setElementStyle()
These allow for custom inline CSS styles to be applied to the panel and to
the specific UI element repectively.

For example:

```
char stylecol1[30]
sprintf(stylecol1, "background-color: #%06X;", (unsigned int) random(0x0, 0xFFFFFF));
ESPUI.setPanelStyle(switch1, stylecol1);
```
This will set the panel of the given control to a random hex colour.

This is supported by both the initial UI message, and by control update messages, so you
can change these styles dynamically in response to other events.

setElementStyle() is not perfect. Because CSS inline styles can only style one specific
DOM element, for controls made up of multiple elements (like the "pad") this is limited.
I have tried to make an appropriate choice for each supported control.
2022-01-02 21:56:32 +00:00
..
css Add feedback to buttons when being pessed. One way to address #110. 2021-12-29 23:01:01 +00:00
js Support for dynamic custom inline styling. 2022-01-02 21:56:32 +00:00
index.htm Graph Frontend work 2019-04-15 13:49:15 +02:00
index.min.htm Update js stuff 2019-12-27 15:36:12 +01:00