Giter Site home page Giter Site logo

Comments (4)

ArianHamdi avatar ArianHamdi commented on June 12, 2024 2

Hi @pettinarip,

Thank you for taking the time to check this issue.

I agree with you, and I think resolving the root problem is better.

I tried your idea for fixing this, but it didn't work the way I expected. When applying the transform to children instead of sticky parent, it still causes a scrollbar.

This was a bit tricky, and I found two solutions for this bug.

Solution 1:
Move the widget to the left side of the area and bring it back to the right side using the left property. In this scenario, hovering over it won't cause a scrollbar to appear.

You can see the changes here: solution 1.

Solution 2:
Apply transform-origin: right bottom. In this scenario, when hover occurs, the widget element gets scaled up from the left and the upper side and doesn't cause a scrollbar. In this solution, the hovering animation is a bit different.

You can see the changes here: solution 2.

Whichever solution you think is more acceptable, I can create a PR with that implementation.

from ethereum-org-website.

pettinarip avatar pettinarip commented on June 12, 2024

Thanks for creating this issue @ArianHamdi

I saw your PR but I think we need to tackle the root problem instead of hiding the overflow.

So, the feedback button is using position: sticky and we are making it bigger on hover, generating a bit of overflow because the same sticky element is the one that is growing.

I think we need to separate those 2 things. The position should be in one element and the scaling in another (the button).

So, IMO:

  • we'd need a wrapper around the button and the content of the popover
  • then, make this wrapper as position: sticky (not the button)
  • with that in place, we can transform the inner button as we were doing

LMK what do you think.

from ethereum-org-website.

pettinarip avatar pettinarip commented on June 12, 2024

@ArianHamdi awesome! thanks for sharing this. Both solutions work great, I think the 1st solution works well while keeping the same animation. So, I'd go with that approach.

from ethereum-org-website.

ArianHamdi avatar ArianHamdi commented on June 12, 2024

@ArianHamdi awesome! thanks for sharing this. Both solutions work great, I think the 1st solution works well while keeping the same animation. So, I'd go with that approach.

@pettinarip Thanks!
I opened a PR with first solution implementation: #12052

from ethereum-org-website.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.