It’s easy for Stimulus/JS to end up full of class toggling that’s really just presentation logic. CSS pseudo-classes can handle states like “empty,” “single item,” or “show/hide controls,” so your JavaScript can stay focused on behavior: radanskoric.com/articles/css...
radanskoric.comPractical CSS: simplifying UI code with pseudo-classesA blog about software development and the Ruby programming language
0 reposts0 likes