Using Comments for Browser-Specific Hacks

What should I do when I need to write custom, and sometimes wonky code, to overcome specific browser behavior?

Be sure to include a comment directly before the code in question.

Adding a note for odd code in these scenarios is important for two reasons. It ensures that no one will unintentionally change the code. It also allows the code’s author to revisit it in the future to see if it’s still needed. Because, as we all know, browser updates occur frequently.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s