Skip to content

Instantly share code, notes, and snippets.

@jehna
Last active October 18, 2018 14:28
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jehna/c19436e4e625520eaaa4266901eee596 to your computer and use it in GitHub Desktop.
Save jehna/c19436e4e625520eaaa4266901eee596 to your computer and use it in GitHub Desktop.
React CSS error highlighter
[class*="undefined"],
[class*="null"] {
border: red 5px solid !important;
background: #0f0 !important;
color: #00f !important;
}
[class*="undefined"]::after,
[class*="null"]::after {
content: "YOU HAVE AN ERROR IN YOUR CODE" !important;
position: fixed !important;
top: 0 !important;
left: 0 !important;
border: red 5px solid !important;
background: #0f0 !important;
color: #00f !important;
font-size: 30px !important;
}
@jehna
Copy link
Author

jehna commented Oct 18, 2018

Highlights your erroronous code like this:
screen shot 2018-10-18 at 16 02 08

https://jsfiddle.net/rm65wo1b/

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