Questions tagged [cssresource]

For questions about CssResources in the Google Web Toolkit.

46 questions
21
votes
4 answers

In GWT 2.0 CssResource, how I can turn off obfuscation for all my css classes?

I have a CssResource where I want to have some of the css classes "mapped" to methods: @ClassName("top-table") String topTable(); But I want to turn off the obfuscation GWT does (while developing at least, for better debugging in firebug, etc). Is…
AlfaTeK
  • 7,487
  • 14
  • 49
  • 90
11
votes
4 answers

Basic arithmetic in GWT CssResource

I'm looking for a way to do something like this: // style.css @def borderSize '2px'; .style { width: borderSize + 2; height: borderSize + 2; } where the width and height attributes would end up having values of 4px.
Matt
  • 722
  • 10
  • 20
8
votes
3 answers

Need app-wide CSS constants in GWT

I'd like to define some colours as constants in a GWT CssResource, and use those constants throughout my application; but I don't know how to do that. I'll tell you what what I've tried. I've created a ClientBundle and a CssResource as…
David
  • 5,184
  • 3
  • 41
  • 67
8
votes
1 answer

How to get GWT CSSResource to parse not() selectors

I realize that the CSS parser that GWT uses will only handle CSS2, but I am targeting iPhone Safari, so I want to be able to use some of the CSS3 stuff. For properties, I have been fine using the literal function provided by GWT, but I'm having…
jhericks
  • 5,833
  • 6
  • 40
  • 60
7
votes
1 answer

How to use dependent style names together with the CssResource obfuscation?

I access the style names through CssResource, either from the UiBinder and from the java views. The problem is I cannot find a way to add and remove suffixes due to the class names obfuscation. By the moment I've managed the situation using…
Andres
  • 1,484
  • 19
  • 29
7
votes
1 answer

Weird error from the Eclipse GWT plugin when having a separate source folder for resources

I have an Eclipse GWT project with two source folders: One for source code and one for resources. This should and does work fine, but nevertheless Eclipse shows the following error message: Resource file style.css is missing (expected at…
futlib
  • 8,258
  • 13
  • 40
  • 55
6
votes
1 answer

How to override default CSS in modern GWT applications?

From the following page: Developer's Guide - CSS Style it is made clear that in modern GWT apps there's two ways to declare css styles: Using a CssResource contained within a ClientBundle. Using an inline element in a UiBinder template. How do you…
Fred
  • 187
  • 5
  • 23
5
votes
1 answer

How to use imported css styles in GWT correctly

Imagine you created the following simple widget with UiBinder:
Eduard Wirch
  • 9,785
  • 9
  • 61
  • 73
4
votes
2 answers

Dynamic CSS class names in GWT

I am in the process of porting a simple CSS grid system to GWT. My CSS file currently has classes like .size1, .size2 etc., and I have a CSS resource that looks like - interface MyResource extends CSSResource { @ClassName("size1") String…
Anupam Jain
  • 7,851
  • 2
  • 39
  • 74
4
votes
1 answer

Attaching an ImageResource from an external CSS file using @sprite

I'm trying to use CssResource and ImageResource together in a GWT2.2 project. CssResource and obfuscation are working properly, but I'm having problems accessing images. I already can access the images through ImageResource directly from the ui.xml…
Andres
  • 1,484
  • 19
  • 29
4
votes
4 answers

GWT CssResource and using @media to support both large and small screens

I'm using GWT's ClientBundle and CssResource to pull in my css definitions. I'd like to set viewports depending upon screen size. Do you know how to achieve this within CssResource? My failed attempt... for ease of testing I've used background…
Carl
  • 2,896
  • 2
  • 32
  • 50
3
votes
1 answer

CSS Resource - Combining literal and runtime substitution

To enable runtime skinning changes that use browser specific rules, I need to combine two CSS-resource capabilities - runtime substitution and literal. For example, to have dynamic button gradient, I would do something like that: button { …
Itzik Yatom
  • 165
  • 1
  • 6
3
votes
1 answer

How exactly would one override a CssResource

Currently I have an application using CssResource in gwt like this... interface MyClientBundle extends ClientBundle{ @Source("images/one.png") Image someImageThatAlwaysLooksTheSame(); @Source("images/two.png") Image…
benstpierre
  • 32,833
  • 51
  • 177
  • 288
3
votes
2 answers

GWT: How to access in one stylesheet constants defined in another stylesheet from the same ClientBundle

This problem is best described with an example. I have the following ClientBundle in my GWT app: interface Resources extends ClientBundle { public static final Resources INSTANCE = GWT.create(Resources.class); @Source("defines.css") …
tsbnunes
  • 1,003
  • 2
  • 10
  • 11
2
votes
1 answer

How can I use the same @def in multiple CssResource css files?

I'd like to say, in a single, centralized location, @def mainColor = #f00; and then, in all of my other css files, refer to mainColor without having to redefine it. Then when I change mainColor in once place, my entire app changes color. The best…
Riley Lark
  • 20,660
  • 15
  • 80
  • 128
1
2 3 4