3 ms·
It's great, but I wish I didn't have to do this in CSS. When you look at the source code, it doesn't look like styling at all, it looks like programming. As s
by wavephorm 15y ago
It's great, but I wish I didn't have to do this in CSS. When you look at the source code, it doesn't look like styling at all, it looks like programming. As soon as your start calling bezier functions in a static styling language, you know something's not right. This type of coding would be much easier to do in JavaScript.
- TazeTSchnitzel 15y agoTrue, but I like being able to do this declaratively. You don't incrementally change it with code, you define a mathematical function against time for the transformation.
- kzrdude 15y agocan we call that pure and functional?
- deleted 15y ago[deleted]
- ralfd 15y agoI don't know much about CSS. What happens here? https://developer.mozilla.org/media/uploads/demos/m/r/mrflix/ce26be858cecaf2b60021f86401337a3/paperfold-css_1333213378_demo_package/css/paperfold.css https://developer.mozilla.org/media/uploads/demos/m/r/mrflix...
- mindhunter 15y agoHalf of the CSS code is used for the demo interaction (time changing, showing the helper elements and for debugging [grouping all animated elements to change the transition-duration all at one]). In production it would be way less complex.
- Kiro 15y agoI thought being able to do something in pure CSS without using JavaScript was something good.
- ceol 15y agoNot if CSS gradually turns into JavaScript.
- scoot 15y ago"This type of coding would be much easier to do in JavaScript." You could do this in JavaScript by manipulating the DOM directly - that's what libraries such as jQuery offer, but having easing functions for transitions belongs as part of the styling[1], unless you're saying that CSS should only be for static layouts? [1] http://www.w3.org/TR/css3-transitions/#transition-timing-function_tag http://www.w3.org/TR/css3-transitions/#transition-timing-fun...