karthik selvaraj
karthik selvaraj

Reputation: 499

Integrating CSS file using ClientBundle in sencha gwt

i am trying to integrate CSS file using clientBundle. i am able to build my app successfully without an error. But when i try to integrate with my app, its not getting reflected.

public interface CSSResources extends ClientBundle {
public CSSResources INSTANCE = GWT.create(CSSResources.class);
@Source("admin.css")
public MyCssResource css();



public static interface MyCssResource extends CssResource {
    String transparents();
}

}

and my admin.css file.

.transparents{
 background-color: transparent;
 }

and in my entrpoint class i am injecting my css resources file.

CSSResources.INSTANCE.css().ensureInjected();

here i am trying to change my background color for panel,

       ContentPanel menuPanel = new ContentPanel();
       menuPanel.setHeaderVisible(false);
       menuPanel.setBorders(false);
       menuPanel.setBodyBorder(false);
       menuPanel.addStyleName(CSSResources.INSTANCE.css().transparents()); // i tried all the scenario by replacing .setstyleName,.setBodyStyleName also

Upvotes: 1

Views: 82

Answers (0)

Related Questions