I know… Yet another newbie question… I am working on my first Website and I am trying to figure out how to set some colours in a constant (or variable) and how to call those within Webstyle. For example, I might have an orange colour that is use for different elements and within different Webstyles and I would like to update all of them by changing just one constant. Is there a way to do that? It is pretty easy in Desktop but in Web?
Create a single WebStyle with the color you want and then SubClass the rest of your styles from that. They inherit attributes just like any other class.
You don’t. Create a WebStyle with a single entry… TextColor. Then subclass that WebStyle to create the others. If you ever need to globally change the TextColor, you change the top level WebStyle and all of the children inherit the change.
I do not quite understand. Since the color property is not exposed, where would the constant be placed ? Or do you mean it would be desirable to have a color property corresponding to the box marked Hex: in the WebStyleEditor for colors ? Then it would be a feature request, right ?
It is true that in JavaScript and HTML one can change colors very precisely in code. Would certainly be nice to be able to do that in Xojo without a hack.
Sometimes it helps when a suggestion comes from users