Jump to content
Search Community

Panel 100vh - User Zoomed In and content is cut off

Valerie test
Moderator Tag

Go to solution Solved by Rodrigo,

Recommended Posts

In this example, the panels are set to 100vh, and at normal browser settings the component is behaving as expected. 

The issue is when the user is zoomed in to 150%, some of the content becomes cut off and unavailable in panel 2.

Is there a fix or best practices for this issue, or how do I best approach to achieve WCAG Level AA

image.thumb.png.e68317febfc0ed7840d7fd38be4cc6ca.png

See the Pen JjzLPZg by vyeltman (@vyeltman) on CodePen

Link to comment
Share on other sites

  • Solution

Hi @Valerie and welcome to the GSAP Forums!

 

Just some minor changes to the CSS and to ScrollTrigger's start point and it should work as you expect:

See the Pen RwdMPMr by GreenSock (@GreenSock) on CodePen

 

Is just about checking the height of the panel when the ScrollTrigger instance is either created or refreshed (that's what function-based values are super useful for).

 

Hopefully this helps.

Happy Tweening!

  • Thanks 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...