Stretching the limits of CSS 3: Amazing creations in pure CSS
independent-software.com
independent-software.com
Some stuff I learned: 1. Most of css3 is supported in IE8, so we felt fine with using the widget in production.
2. With any reasonable LESS / SASS syntax, it's easy to generate complex stuff so long as it's limited to a discrete number of states. Stuff like tic-tac-toe are easily doable if you treat them as a state-machine.
3. It's way faster than JS, and there's a good reason for it. CSS can be totally figured out in one round of parsing, and so long as no JS is used to change it, the same parsed state can be used for all of your states. Even though it adds tens of kilobytes to the file size of both CSS and HTML, it's still faster than executing code.
This definitely isn't the right solution for all problems, but I think it's important to think about whether you problem can be solved in pure CSS, and to strongly prefer it for static sites and nearly-static sites.
But for me personally, creating something like this, with no constraints on performance, filesize, compatibility, etc, is no more amazing than building a massive website (like say bbc.co.uk) that renders perfectly, almost instantly, across many different devices.
But if there's someone who works on bbc.co.uk reading this, I salute you for the amazing work you do, because you often don't get enough credit.
It's just down to how CSS and JS work.
Not always, but it's mostly true.
I also wrote a short blog post describing some of the mechanics of the build for those that find that sort of thing interesting.
Please use some caching solution to avoid your web host from shutting your site in cases like this.
* https://codepen.io/jaysalvat/pen/HaqBf
* https://codepen.io/juliangarnier/pen/idhuG
* https://codepen.io/rgg/pen/QbRyOq
How many box-shadows is it using?