Inspired by this feature request: https://forum.pimatic.org/topic/236/changing-the-colour-of-values-based-on-a-set-of-rules
I started to write a plugin but need your help @developer
The “backend” is already finished, but at the moment I have no idea how to solve the frontend part.
You could define a rule like:
if bla
then set css "color" of "body" to "#FF00FF"
color - could be any CSS attribute
body - needs to be a valid CSS selector
FF00FF - a matching value for the attribute
The three variables were resolved by the action handler, but how should I change the CSS?
There needs to be something in the css-inject-page.coffee but no idea yet.
Setting the CSS could be done with
document.querySelector("{selector}").style.{attribute} = "{value}";
Plugin could be found here:
https://github.com/saxn-paule/pimatic-css-inject
Sample: