Monday, January 31, 2011

Re: a:hover in CSSResource Bundles

On Mon, Jan 31, 2011 at 17:23, Tej Sarup <tej.sarup@gmail.com> 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={res.style.anchorStyle}>someLink</a>
> In my CSSResource interface I have declared the
> String anchorStyle ( );
> In the CSS file I have:
> .anchorStyle{
> -- style info
> }
> ------------------------------------------------------------------------------------------------

Tej,

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
selector

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

> 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.


HTH,
-- 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 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