Monday, January 31, 2011

Re: a:hover in CSSResource Bundles

On Mon, Jan 31, 2011 at 17:23, Tej Sarup <> wrote:
> Joe,
> Thank you.
> But my could you please clarify how im supposed to do this?
> In my ui binder template I have:
> <a class={}>someLink</a>
> In my CSSResource interface I have declared the
> String anchorStyle ( );
> In the CSS file I have:
> .anchorStyle{
> -- style info
> }
> ------------------------------------------------------------------------------------------------


Please see my views inline

> 1. How do I declare style for hover in this case?
a.anchorStyle:hover or even anchorStyle:hover both should work just
fine, and GWT would know that it's a element+class+pseudo class

> 1.1 Do I have to make a new entry in the java interface?

> 2. Is there any way I can define styles for the HTML elements link <a>,
> <h1>,<span> which are linked to the element as opposed to a CSS class?
Put them in the css file, GWT is clever enough to know that they are
tag level css selectors and will honour them.

> 2.1 I want to have a particular set of fonts and styles to the <body> tag,
> what is the best way to do this?
If it's used across the application, you can either load it from the
host page using a <link>, or load it from the module.gwt.xml file
using <style> or use CSS resources, I've used all 3 ways and all of
them work as expected.

-- Joe

Proper software development is like female orgasm. Some claim it's a
myth, others try very hard to make it happen but don't know how, and
most magazines, books and videos showing it are showing faked ones.

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment