Jump to content
Search Community

Media breakpoint in JS: "Harvey" alternatives?

Robert Wildling test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi, dear Greensockers!

My question is actually not totally GSAP-related, but since here are the best JS coders, I dare to ask anyway. I hope this is ok with you!

 

I repeatedly come into the situation, where breakpoints require different parameter settings for a tween. My current solution is a settings object with some parameters for each breakpoint and `Harvey`, https://github.com/harvesthq/harvey, a - IMO - wonderful JS lib that takes care about breakpoints, but which unfortunately not supported anymore.

 

That's why I wanted to ask you, how you approach the breakpoint problem, if you write your own script or if you can recommend another library. 

Thank you!

Link to comment
Share on other sites

How far back do you need to provide support for browsers?

 

Harvey was adopted from Paul’s matchMedia.js, while Harvey was updated 6 years ago, Pauls was updated 2 years ago … so can you just use Pauls? Certain things work regardless of needing updated solely based upon their intensions, is Harvey beginning to fail for you in some way?

 

Here are some GSAP specific examples you may find interesting:

  • https://codepen.io/osublake/pen/vExQEy
  • https://codepen.io/osublake/pen/jLLqbY
  • https://codepen.io/PointC/pen/RGmdVx
  • etc., (some of those examples may be in the links @PointC mentioned above)

 

  • Like 3
Link to comment
Share on other sites

3 minutes ago, ¯\_(ツ)_/¯ said:

How far back do you need to provide support for browsers?

 

Harvey was adopted from Paul’s matchMedia.js, while Harvey was updated 6 years ago, Pauls was updated 2 years ago … so can you just use Pauls? Certain things work regardless of needing updated solely based upon their intensions, is Harvey beginning to fail for you in some way?

 

Here are some GSAP specific examples you may find interesting:

 


No, Harvey is not failing at all! It works perfectly fine and I really do like the api it provides! 
But unfortunately the developer and also the company he works/ed(?) for, do not respond. Honestly, I have no clue, what could be improved with Harvey, so an update might just simply not be necessary. On the other hand, there is so much going on in the JS universe, that I kind of got accustomed that libraries receive changes on a more or less regular basis...
Anyway, I was just curious, which solutions other people use and therefore shouted out the question.
Thanks a lot [no idea how to cite your name!] for the hint about Paul's update and for the examples! 

Link to comment
Share on other sites

You're welcome.

 

Yikes why are those pens playing when quoted?

 

Many times when things are created they stand without needing updates or improvement going forward for many years until the actual specification catches up without the need for such libraries. Sometimes things are simple regarding intention that they simply just work from the day of their inception. In which case either Harvey or Paul's implementation (or others) may still serve you well if you need them for support and backwards compatibility.

 

Sorry about my persona quotability. I love that ascii shrug it makes me smile whenever I see it. Plus it gives me a clean greensock-ish green avatar by default.  @¯\_(ツ)_/¯

  • Like 3
Link to comment
Share on other sites

  • 1 month later...
On 4/10/2019 at 12:55 PM, ¯\_(ツ)_/¯ said:

I love that ascii shrug it makes me smile whenever I see it. Plus it gives me a clean greensock-ish green avatar by default.

 

So much for those smiles, I guess not anymore, now its some sort of diaper poo brown color.

 

Avatar-no-longer-green.jpg.c69ba2f2be7ee987758c38599c18cc16.jpg

 

Yikes, what happened someone put me in da sh!tter?

 

¯\_(ツ)_/¯

  • Haha 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...