Additionally, with UI Automation tests our testers are tempted to use ugly selectors based on class names. This is a poor idea because then a class name changes a year later and 400 tests fail, even though functionally the site works just as well as before.
The real question here is what you want to do with your CSS. If you want to apply rules the site over, then don't use <ui:style>, but rather a CSSResource interface. This way that interface can be used by many widgets' UiBinders. However bespoke, small CSS tweaks do fit nicely into <ui:style> and you can always move them out to a CSSResource interface in the future if you want to use them multiple places. Note, from my experience you cannot well handle CSS inheritance/overriding between widgets with <ui:style>, but you can with standalone CSSResource interfaces.
Sincerely,
Joseph
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/sEZBJmtPZ0sJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment