我有
等界面public interface PopupPanelWithConfirmStyle extends ClientBundle {
public static final PopupPanelWithConfirmStyle I = GWT.create(PopupPanelWithConfirmStyle.class);
@Source("PopupPanelWithConfirmStyle.css")
public Style css();
public interface Style extends CssResource {
@ClassName("popupPanelWithConfirmStyle")
String popupPanelWithConfirmStyle();
@ClassName("confirmButton")
String confirmButton();
}
}
adn我有标准的PushButton,它有gwt-PushButton-up,.gwt-PushButton-up-hovering,.gwt-PushButton-up-disabled,.gwt-PushButton-down,.gwt-PushButton-down-hovering, .gwt-PushButton-down-disabled和其他样式
所以我设置了PushButton样式 - confirmButton并编写自己的css
.popupPanelWithConfirmStyle {
background: none repeat scroll 0 0 white;
padding: 3px;
z-index: 100;
}
.confirmButton{
border-radius: 2px 2px 2px 2px;
margin: 0;
text-decoration: none;
padding: 3px 5px;
}
@external confirmButton-up, confirmButton-up-hovering, confirmButton-up-disabled, confirmButton-down, confirmButton-down-hovering, confirmButton-down-disabled
.confirmButton-up {
-moz-border-bottom-colors: none;
-moz-border-image: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: #BBBBBB #BBBBBB #A0A0A0;
border-style: solid;
border-width: 1px;
cursor: pointer;
}
.confirmButton-up-hovering {
border: 1px solid #939393;
cursor: pointer;
}
.confirmButton-up-disabled {
border: 1px solid #BBBBBB;
cursor: default;
opacity: 0.5;
}
.confirmButton-down {
border: 1px inset #666666;
cursor: pointer;
outline: medium none;
padding: 4px 4px 2px 6px;
}
.confirmButton-down-hovering {
-moz-border-bottom-colors: none;
-moz-border-image: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
border-color: #333333 #939393 #939393;
border-right: 1px solid #939393;
border-style: solid;
border-width: 1px;
cursor: pointer;
}
.confirmButton-down-disabled {
border: 1px outset #CCCCCC;
cursor: default;
opacity: 0.5;
}
当我运行gwt时 - 我明白了 -
div tabindex="0" class="GGUR4G1EN GGUR4G1EN-up" role="button" aria-pressed="false"
我该怎么办? .confirmButton-up将在GGUR4G1EN-up
中转换抱歉我的英文。
答案 0 :(得分:1)
目前无法做到这一点:http://code.google.com/p/google-web-toolkit/issues/detail?id=4746
如果您想利用依赖样式名称,则必须禁用类名称的混淆(例如,在CSS中使用@external
,而不仅仅是-up
,-hover
等变种,也是主要的风格名称)。这意味着您可以在CSS资源之间存在命名冲突。