I am trying to get the buttons to have a 3D look with a gradient. I have inserted this into the button CSS section but it has no effect. Is there something missing here? I got this from CSS schools website.
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {
height: 200px;
background-image: linear-gradient(to top, rgba(255,0,0,1),rgba(255,0,0,0), rgba(255,0,0,1));
}
</style>
</head>
<body>
<h1>Linear Gradient - Transparency</h1>
<p>To add transparency, we use the rgba() function to define the color stops. The last parameter in the rgba() function can be a value from 0 to 1, and it defines the transparency of the color: 0 indicates full transparency, 1 indicates full color (no transparency).</p>
<div id="grad1"></div>
</body>
</html>
This will however affect all buttons on the dashboard
If you want only few or a group of buttons styled, you will have to repeat the style entry multiple times for each button using a more specific css selector.
There is no means of adding CSS or a class to your button.
you have to use a suitable CSS selector and some style code.
I have raised a PR that would permit you to simply add a class name to the button (or text or group or button or ...) that would should simplify situations like this but it is not yet been accepted.
If I want to invert the gradient with a mouse hold over do
i use the mouse down code? is there a resource where I could read up on the working of the css for Node-red dashboard?
Can the border of the button also be set with this style function?
Thanks