开发者

How to get GWT console/development mode to generate css errors?

开发者 https://www.devze.com 2022-12-25 19:13 出处:网络
I noticed that when running GWT, it doesn\'t alert me of css errors such as missing/misspelled classes. Even the error console of Firefox doesn\'t prompt anything.

I noticed that when running GWT, it doesn't alert me of css errors such as missing/misspelled classes. Even the error console of Firefox doesn't prompt anything.

I'm skinning my web app pretty intensively, need a way to show up the css errors, any sugges开发者_Go百科tion that I can try?

Thanks in advance.


In order for GWT to report any CSS errors (misspelled/missing class names), you need to be including your CSSs in your GWT project via CssResource (check out the docs for usage examples, etc). If you are using UiBinder, all the CSS you declare in UiBinder's XML files are automagically converted to CssResources, so you get the benefits there too (plus, with the Google Plugin for Eclipse, you'll get nice, red underlines under any misspelled/missing class names, just as you do with any other Java errors).

Note however, that CssResource obfuscates your style names by default, so it might take a bit of work to refactor your project to take that into account (again, see the docs for a more extensive read).

0

精彩评论

暂无评论...
验证码 换一张
取 消