一个 GWT CssResource,两个实现(css 文件)
public interface ReviewPanelStyle extends CssResource {...}
@Source("BlueReviewPanelStyle.css")
ReviewPanelStyle BlueReviewPanelStyle();
@Source("YellowReviewPanelStyle.css")
ReviewPanelStyle YellowReviewPanelStyle();
我们认为这应该有效,但事实并非如此。
样式元素的颜色(无论与黄色或蓝色 css 相关的天气如何)将根据这两行的顺序进行样式设置。
Resources.INSTANCE.YellowReviewPanelStyle().ensureInjected();
Resources.INSTANCE.BlueReviewPanelStyle().ensureInjected();
作为解决办法,我复制了 ReviewPanelStyle (ReviewPanelStyle2),但我宁愿不......有什么想法吗?
public interface ReviewPanelStyle extends CssResource {...}
@Source("BlueReviewPanelStyle.css")
ReviewPanelStyle BlueReviewPanelStyle();
@Source("YellowReviewPanelStyle.css")
ReviewPanelStyle YellowReviewPanelStyle();
We would think that this should work, however it does not.
The color of elements styled (regardless of weather associated with the Yellow or Blue css) will be styled based on the order of these two lines.
Resources.INSTANCE.YellowReviewPanelStyle().ensureInjected();
Resources.INSTANCE.BlueReviewPanelStyle().ensureInjected();
As a work around I duplicated ReviewPanelStyle (ReviewPanelStyle2), but I rather not...any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为每种样式定义两个单独的接口应该可以解决问题。如需了解更多信息,请访问 http://code.google.com/webtoolkit/doc/最新/DevGuideClientBundle.html#Scope
Defining two separate interfaces for each style should do the trick. More information at http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#Scope