3 ms·
Interesting to see this is possible, but this is beyond what I would want to use css for, how far will "look ma! no javascript!" go? Seing the logic in a jquer
by krosaen 16y ago
Interesting to see this is possible, but this is beyond what I would want to use css for, how far will "look ma! no javascript!" go? Seing the logic in a jquery click handler seems at least as readable / maintainable as a bunch of css rules for the same reason I prefer to have more logic in java in android applications than in various xml layout and manifest files.
- jrockway 16y agoIt's easier to optimize a description of what the results should be than to optimize a description of how to calculate the results. If you say "give me the first 10 prime numbers", that's easy to calculate efficiently . If you write out the Sieve of Eratosthenes, then that's harder to make efficient. Similarly, it's easier to optimize CSS rendering than it is to optimize arbitrary JavaScript programs.
- krosaen 16y agohmm, good point, I hadn't thought that this would be for optimization purposes. but is it premature optimization if the css way is fuglier and the js way is fast enough to get the desired framerate on modern browsers? would like to see some stats.
- nowarninglabel 16y agoDepending on the implementation, a CSS only lightbox can be 508 accessible, and a javascript lightbox could be inaccessible.
- bmelton 16y agoDepending on the implementation, a Javascript only lightbox can be 508 accessible, and a CSS lightbox could be inaccessible.