Jump to content
Search Community

ScrollTrigger pin with display flex flex-basis percentage round up

wg178910 test
Moderator Tag

Recommended Posts

Hi everyone. 

 

I'm currently working on a project that uses scroll trigger pinning an element in a parent container. However, it comes to my notice that whenever I use a percentage in flex-basis, the child element's width changes from something like 123.34 to 124 whenever it is being pinned (just like the width of the blue box changing in the demo). This is a small difference but pretty noticeable on high resolution devices. Is there any solution to that? I know that I could pin the entire container but everything is already set up and I just don't want to tear everything down and rebuild everything.

 

Thank you in advance. 

See the Pen qBgvzPL by Roy-M-the-animator (@Roy-M-the-animator) on CodePen

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