Looking for secondary dependent styles?

I am just looking through the GWT Tutorial , and one thing that I just don’t understand is when and why to use dependent secondary styles. If I define a style in a .css stylesheet and use a method addStyleName, it seems to have the same effect.

eg. applying a secondary dependent style to a button or applying it as a style-independent style seems to give accurate results.

+3
source share
1 answer

Basically, the dependent name is more general, as it is computed at runtime. You can add the dependent name "highlighted" to anyone Widgetwithout knowing what it is, and GWT will offer you the appropriate css class name. You don’t need to specify the highlighted, highlighted highlighted highlighted highlighted highlighted highlighted icon, mycustomthing highlighted in GWT (you still need to create them all in css code).

+2
source

Source: https://habr.com/ru/post/1787474/


All Articles