Maintaining CSS Style States using "Infinite" Transition Delays
joelb.me
joelb.me
Implementation of often basic UI design concepts and interactions can quite often require some serious contortions of the HTML, CSS or both (though very fortunately, less and less the HTML). CSS is designed around being exceptionally flexible but nonetheless, there is no real consideration for usability or common patterns and use cases (or for the poor souls who may have to wrap their heads around these styles later on). I think in the end this is leading towards some pretty ugly legacy issues.
Sadly, I have no real solution here so I'm just bitching. I sort of see why we are at this point, and I don't currently see any way that a somewhat haphazard standards definition process can possibly focus on usability. Perhaps someone else here does?
animation-fill-mode
Perhaps the solution is in frameworks or abstractions but that is also troubling. Who knows, it's still the best we've got right now, and that's going to have to be good enough for me.
My favorite example is the way transitions handle height/width properties set it auto, in that they just don't. If you do decide to change the height of an "auto" sized item and want a transition you instead have to set it's current height explicitly (in Javascript) first, then set it to the height of the to the height of the new content (having calculated that somehow. What is worse you can't have the transition turned on, because setting from auto to X with the transitions on will cause a transition 'blip' from 0 to X.
The fact that this very simple and obvious case (that of changing the contents of something and having the height transition smoothly) was not addressed in the transition specifications is exactly what I am talking about.
On IE-9 it works the first time you try it but then the other buttons don't have any effect.
Just once I'd like an organization to have a corporate standard that mandates Chrome's latest version.
Do these actions (tap-click, screen touch) not send separate mouse{down,up} events? Because that might be related.
Given how easy it is to duplicate the same effect in Javascript, I see no reason to use this hack.