Configure Aptana to ignore CSS Hacks
April 18, 2008
Aptana is a client-side web development IDE shipped as both a standalone app and Eclipse plugin. HTML, CSS, and JavaScript editors with code completion and validation. Document your JS with Javadoc like syntax for inline context help. Supports major JS libraries. It’s a pain that MooTools uses NaturalDocs, so no IDE love for me with my favorite lib… but no other IDE supports NaturalDocs either.
The CSS validator is based on CSSTidy. It comes with some exclusion rules to prevent false positives and you can add your own. I use a couple of CSS hacks/filters, namely “*property” for all IE and “_property” for IE6/5. These regular expressions will prevent the validator from reporting errors related to the hacks. Enter them one at a time at Preferences -> Aptana -> Editors -> CSS -> Validation:
.*unrecognized : \*[-a-z]*: [%\(\)-_'"./?0-9a-zA-Z ]*; for .*
.*unrecognized : \*zoo 1; for .*
.*unrecognized : : for null.*
.*Property _[-a-z]* doesn't exist.*
.*Parse error - Unrecognized .*
UPDATE: I stopped using Aptana years ago when they dropped Ruby support and switched to Netbeans. I was really happy with the change for a long time and then I finally tried IntelliJ again. Really amazing, Hard to imagine what tool could top it but I’m sure I’ll be writing about it in a couple years. 🙂
Filed under: Uncategorized | Comments (2)
This cleaned up my Parse Errors, but I still get the following errors:
unrecognized: *margin-right:-1px; for .column33
and
Property: _margin doesn’t exist
Woah, I suck at prompt replies! Mr. California I’m hoping that sometime in the last year you found an answer but if not all you need to do is add or tweak the regexes I think:
.*unrecognized: \*.*
.*Property: _[-a-z]+ doesn’t exist.*
If you use a Mac I highly recommend some freeware called Reggy (http://reggyapp.com/) which makes it easy to figure out regular expressions for just about anything.