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.