3 ms·
CSS hold mutable state see e.g CSS counters. It's not just about concision, it's also about convenience (not need to do js at all) and about performance (no nee
by The_rationalist 5y ago
CSS hold mutable state see e.g CSS counters.
It's not just about concision, it's also about convenience (not need to do js at all) and about performance (no need to call the v8 engine, which is executed after css and has inherent, avoidable overhead)
- slver 5y agoYou're talking about the performance of a click action. How many clicks a second do your users do? Millions? Also counters aren't mutable state in the sense of a value changing in time. The "increment" name was chosen so it's intuitive. They're more like the nth-child selectors, where an attribute's value is determined by its position in a list of matching nodes (where the match is determined by the increment being specified in those elements).