How can I suppress certain CSS errors in Aptana Studio 3?

时间秒杀一切 提交于 2019-12-17 20:43:19

问题


I use Aptana Studio 3 for my web development, and I love it except for a few small gripes. One of these gripes is that Aptana decides to treat some CSS parameters as invalid, marking them with a big red X on that line of code. This is helpful when the error is really an error, but some parameters that are perfectly valid but not a part of the w3 spec (cursor: none, for example) get flagged as invalid.

I would just ignore these errors, but as in any other eclipse variant, an error anywhere in a project results in the whole project marked as having errors. Then I get warnings whenever I try to publish it, which I ignore. This is both annoying and risky-- I could be ignoring a real warning by accident.

Is there any way to suppress specific errors in Aptana/Eclipse, or perhaps to suppress all CSS errors globally?

Failing that, does anyone know a w3-valid alternative to cursor: none; that hides the mouse when it hovers over an element?


回答1:


You can add filters for CSS errors, or turn off CSS validation altogether. Please see here for more information:

  1. Go to Preferences > Studio > Validation
  2. Click on the CSS node
  3. Add or edit options as appropriate

http://wiki.appcelerator.org/display/tis/Adding+custom+error+message+filters+to+the+Problems+View




回答2:


I spent a long time trying to figure out what kind of regex expression Aptana was looking for. I was trying out \s for spaces and tons of stuff like that. It would turn out that to surpress this specific error, all you need to do is make an entry under the "Tidy Validator" of the HTML validation section...

should trim empty <canvas>

PS. (just to make this post a little more worth it...) .* means "match zero or more of any character... I didn't see the dots in the image on that page Igor linked to.



来源:https://stackoverflow.com/questions/6652793/how-can-i-suppress-certain-css-errors-in-aptana-studio-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!