css - 在 GWT 2.0 CssResource 中,如何关闭一个 CssResource 中所有类的混淆

标签 css gwt

我知道可以对所有 css 资源 ( In GWT 2.0 CssResource, how I can turn off obfuscation for all my css classes? ) 或一个外部类(使用 @external)关闭混淆

如何仅关闭一种类型的 CSSResource 混淆。我想使用一些 Twitter Bootstrap,他们使用 advanced attributed selectors来自CSS3。我认为让这些工作的唯一方法是禁用 CSS 混淆。

当然,我可以避免使用 CssResource,但我喜欢它所提供的方便的制表符补全和静态分析功能。

有什么想法吗?这不起作用:

<when-type-is class="my.org.CssResource">
    <set-configuration-property name="CssResource.style" value="pretty"/>
</when-type-is>

最佳答案

我正在回答我自己的问题,因为它很难找到:

通过查看源代码,并与 GWT wiki 进行交叉比较,我发现:

/* @external also accepts tail-globs */
@external .myProject-*;
.myProject-text {}
.myProject-foo {}

因此,如果您想让文件中 CSS 资源中的所有类都是外部的,请使用:

@external *;

关于css - 在 GWT 2.0 CssResource 中,如何关闭一个 CssResource 中所有类的混淆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13133337/

相关文章:

css - 如何更改 fb-recommendations 框的 css 样式?

javascript - GWT native 函数 - 每个字符串的引用

java - Eclipse 和 GWT 在错误的包中寻找继承的模块,尽管 gwt.xml 文件具有正确的路径?

Eclipse (GWT) 不运行 google webapplication 项目

html - CSS 高度 :auto not showing for responsive image

php - 为 wordpress 主题添加额外的侧边栏

html - 表格内容未在移动设备上调整大小

html - 右边有多个DD的DT?

maven - NoSuchMethodError : org. eclipse.jetty.websocket.server.WebSocketServerFactory.<init>(Ljavax/servlet/ServletContext;)V

java - 在 GWT 中保存 Activity 状态