:not(.active) vs overriding active class
There are times when you need to toggle classes with javascript. Perhaps it is part of a many items you would only want to show an active one amongst many. So you got this piece of javascript:
JavaScript
1 | element.classList.toggle('active'); |
Makes you wonder when writing your bit of css, some would go for something like this:
SCSS
1 | .item { |
For me, I would prefer the inverse…