Skip to content

Instantly share code, notes, and snippets.

@matthewstokeley
Last active November 4, 2019 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthewstokeley/677d3b402a8424408483ef0e8a63e42b to your computer and use it in GitHub Desktop.
Save matthewstokeley/677d3b402a8424408483ef0e8a63e42b to your computer and use it in GitHub Desktop.
brittleness

Examples of brittle code

Highly-specific element selectors -


querySelector('.very .nested .element')

Why is this wrong? Changing the document structure forces refactoring in multiple places.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment