Friday, 6 September 2013

GWT: is it possible to create a parametrized css style?

GWT: is it possible to create a parametrized css style?

I have CSS style which draws a button. I need to reuse this style to draw
a button of different color.
.button {
color: white;
background-color: black;
border: 1px solid orange;
(...)
}
I know I can override CSS attributes. But the problem here is that I have
to override almost all code of the button and it doesn't make sense. Its
easier to create another CSS class which differs from this only by color
values. Is it possible to create some style which can take the colors as
parameters, preserving all other css attributes?

No comments:

Post a Comment