Hey Jason Knight! Thank you so much for stopping by with your thoughtful response!! I love your work on Medium (especially here in the responses section), so I feel genuinely honored!

You're πŸ’―% right that there's no need to do these type of shenanigans to apply CSS using JS in apps or websites.

This article actually came about when I was working on a scraping / automation tool that was meant to be used from the console.

In addition, the site to be scraped has obfuscated "JSS" classes instead of a logical naming scheme for CSS.

Ultimately, I was looking for a simple toggle "off" switch by adding "display: none" as online CSS using JavaScript. Meanwhile, I found myself adding various borders from the console as I explored what the obfuscated classes actually meant.


πŸ€“ The physical therapist who writes JavaScript πŸ’ͺ Web Developer 😎 Mentor 🧠 DPT πŸ˜„ SEO Expert 😁 React πŸ˜† Jamstack πŸ’¬ Ask me anything πŸ‘‰ DoctorDerek.com πŸ‘ˆ

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store