How to I properly use Images within a ClientBundle css?
Example:
interface MyButton extends ClientBundle {
@Source(MyButton.css)
Style style();
interface Style extends CssResource {
@ClassName(myButton-ok)
String okStyle();
}
.myButton-ok {
background: green
There was a typo above, but the issue remains:
background: url(ok.png) no-repeat;
or
background-image: url(ok.png) no-repeat;
Both no background image is displayed.
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To unsubscribe from this
Do you want to bundle images into your JS file or do you really want the
images to be loaded externally?
In the first case you have to use ImageResource inside your ClientBundle so
that images will be bundled into your JS file. Read the chapters
ImageResource and CssResource - Image Sprites:
Very useful, thanks for the comprehensive answer.
Yes probably having images externally is what I want, because I'm trying to
define a linear gradient with an image as follows:
background-image: url(ok.png) no-repeat 5px,
-webkit-linear-gradient(top, rgba(255, 255, 255, 0.8), rgba(255,
Hm, I did as you told creating a public folder in the package where
app.gwt.xml is placed.
Though restarting the dev mode completely and clearing the cache, I still
don't see any image.
Css shows background: none
--
You received this message because you are subscribed to the Google Groups
On Sunday, April 7, 2013 10:34:31 PM UTC+2, membersound wrote:
Very useful, thanks for the comprehensive answer.
Yes probably having images externally is what I want, because I'm trying
to define a linear gradient with an image as follows:
background-image: url(ok.png) no-repeat 5px,
Ok probably similar to this issue I found searching for DataResource:
http://stackoverflow.com/questions/11209876/gwt-imageresource-accessed-within-a-css-property
--
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To unsubscribe from this