|
|
|
|
|
by onion2k
1346 days ago
|
|
I'm not going to do that because it's effectively double the work for 1% of the users. This implies that if you only did the CSS version you'd do the same amount of work as the JS version but it would work for everyone. Why wouldn't you do that? Doing only the JS version means you spend the same engineering effort but it doesn't work for as many people. Choosing to do that when you have a choice makes absolutely no sense. |
|
> > Doing only the JS version means you spend the same engineering effort but it doesn't work for as many people
Where did I say it would be the same engineering effort? I explicitly said it's more for the CSS version. In my example, the CSS version is inferior to what the JS library can already do. Creating a spring animation is only one of the things that Framer Motion can do in JS built in. If I did everything in (S)CSS I would basically be re-implementing Framer Motion, which, as I stated, is double the work for <1% of users. Why would I want to re-implement a package when it's already there for me to use? So yes, it "absolutely makes sense" to do everything in JS only.