In JavaScript, you can directly change the CSS on an element by simply going into the style object and changing the styles in it such as:
MyButton.style.backgroundColor = 'blue';
MyButton.style.color = 'red';
Is there a way to do this using Delphi code?
This post was super helpful in terms of showing how to work with CSS in TMS Web Core.
You can set inline CSS using Delphi with the following code:
MyButton.ElementHandle.style.setProperty('background-color', 'blue');
MyButton.ElementHandle.style.setProperty('color', 'red');