views:

28

answers:

1

Here is shown how to use styles in CamelCase, but how to use styles with a dash in its name? Valid Java method name can't have dashes in it (at least eclipse shows syntax error).

Style defined in template:

.menu-inactive{ background-color: grey; }
+1  A: 

You can use CssResource.ClassName for valid CSS class names that are invalid Java identifiers.

interface MyCssResource extends CssResource {
    @CssResource.ClassName("menu-inactive")
    String menuInactive();
}
Nate Bundy