From c8c41aa077d3d69d53aa7ca24e0f0918269138e5 Mon Sep 17 00:00:00 2001 From: Mike Burton Date: Sat, 29 Nov 2025 09:53:38 -0800 Subject: [PATCH] add example of using setCustomCSS + setPanelClass --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1736e56..acede6d 100644 --- a/README.md +++ b/README.md @@ -709,7 +709,18 @@ void setup() { The custom CSS is served at `/css/custom.css` and is automatically included in the `index.htm` file. -This can be used in conjunction with `setPanelClass` to apply custom CSS styles to controls. +This can be used in conjunction with `setPanelClass` to apply custom CSS styles to controls. For example: + +```cpp +// Make the value span of the panel red on error +ESPUI.setCustomCSS(".err span { color: red; }"); +// Set the panel class to 'err' to make its value red +ESPUI.setPanelClass(, "err"); +``` + +For simpler styles without using classes, you can use `setElementStyle` or `setPanelStyle` instead. + + # Notes for Development