3 ms·
http://marynaaleksandrova.info/labs/happy-easter/style.css http://marynaaleksandrova.info/labs/happy-easter/style.css (6500 lines of CSS) What you save in CPU
by jQueryIsAwesome 15y ago
http://marynaaleksandrova.info/labs/happy-easter/style.css http://marynaaleksandrova.info/labs/happy-easter/style.css (6500 lines of CSS)
What you save in CPU is heavily outbalanced by what you lose in code maintainability and bandwidth
- ronaldj 15y agoNo sane person would write it like this. Have code generate the styles for you. The animation is nice though.
- m_aleksandrova 15y agoThanks, I used http://prefixr.com/ http://prefixr.com/, everything else handcoded:)
- icki 15y ago156kB?
- gue5t 15y agoSave in CPU? Mine was pegged the whole time.
- michael_miller 15y agoWere you using a browser which supports hardware accelerated animations? On my Macbook Pro (last gen), my CPU mostly stayed around 10-15% when viewing the site with Safari.
- dimarco 15y agoMy CPU barely worked at all. (latest MB Pro).
- PKKid 15y agoI peeked at 5% CPU utilization in Chrome on Win7.
- htilford 15y agoit's likely only 1000 lines of less, sass, scss, or stylus which can be well organized into modules and output compressed css if bandwidth is a concern. It would also be possible to only deliver the css applicable to the user's browser (the vast majority of the lines are redundancies due to vendor prefixes). I don't see it being the case that you couldn't optimize the file size down to about the same size as the equivalent jQuery animation.
- m_aleksandrova 15y agoI have never work with anything you mentioned, and actually didn't ever felt that I need them. While doing this one, I really understand that I need something to cut down code. So definitely will use them next time!