Idea: Static code analysis of HTML and CSS

I like tools like StyleCop and FxCop. When I was “pair-working” with our resident CSS master I noticed how he could determine what was wrong, or would be wrong, just from looking at the markup and stylesheet. “Block elements inside block elements” and such. The broken box model in Internet Explorer 5 is legendary, if you’re using width and padding on something it probably won’t look like you wanted it too.

I believe you can determine possible rendering bugs in various browsers through static code analysis and applying a (giant) set of semantic rules. You could have this as a step in your deployment process to warn you that some pages might look incorrectly in certain browsers, so you can optimize your tests. The real problem is collecting all those rules.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s