4 ms·
I generally try to not manipulate properties directly through javascript, rather declaring a class for the purpose. Doesn't seem like an unreasonable requiremen
by troels 12y ago
I generally try to not manipulate properties directly through javascript, rather declaring a class for the purpose. Doesn't seem like an unreasonable requirement for proper performance? (I mean, compared to having stuff like `will-change`)
- untog 12y agoIt is an unreasonable requirement in places, though. Before now I've made things like swipable elements that track the user's touch - i.e., you touch down, pull your finger left and the box follows you. That's not possible to do in pure CSS.
- bryanlarsen 12y agoBut you still use Javascript to apply the class to the element, right? So how can the browser know that your Javascript might do that? It seems to me to know that a rule along the lines of "might-add-class: foo;" would get us back most of that separation of presentation and content.