Giter Site home page Giter Site logo

Comments (5)

brandonpittman avatar brandonpittman commented on July 27, 2024 1

I’ll play with it while I’m doing the other thing—see if I can’t get it to play nicely with transform.

from vuetensils.

AustinGil avatar AustinGil commented on July 27, 2024

So would it be like the VToggle component accepts some prop like direction and it can switch between vertical and horizontal?

from vuetensils.

juliandreas avatar juliandreas commented on July 27, 2024

So would it be like the VToggle component accepts some prop like direction and it can switch between vertical and horizontal?

That would do it.

from vuetensils.

brandonpittman avatar brandonpittman commented on July 27, 2024

@Stegosource I was just looking at the toggle source and saw it’s essentially animating height. Now I get why the transition felt a little janky on the toggle. Why not scaleY(1) instead?

from vuetensils.

AustinGil avatar AustinGil commented on July 27, 2024

@brandonpittman the issue I see with scaleY is that the DOM would still maintain the space for the toggled content, so you would have empty space where it will scale in and out. And what you want is the flow of the document to shift to accommodate the changes. It's sort of like opacity:0. You can't see the element, but the space it takes up is still there.

Or I may be misunderstanding you, but I just quickly played around with adding the following styles to a div and toggling the transform on and off:

transition: 0.2s transform ease;
transform-origin: top;
transform: scaleY(0);

I know that a transform is better for performance, but I just couldn't find a better way for the document to apply the change in height than to apply the change to the height property..

from vuetensils.

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.