Giter Site home page Giter Site logo

Comments (4)

mikke89 avatar mikke89 commented on July 26, 2024 1

Hey, and thanks for the kind words! And also for the detailed issue description.

Yeah, I see that we are not acting like web browsers here. In fact, we haven't really made any considerations for multiple animation values acting on the same properties. That's a use case I haven't come across yet, so we simply don't handle that in any particular way.

Just to be clear, we should support multiple animation values more generally, I added a test here just be sure that it works as expected in a more straightforward case: 559d84a

I might look to see if we can do something about this without too large changes. For now though, I'd suggest that you use a single set of keyframes if you can, e.g.:

@keyframes fadeinout {
    20%, 80% {
        opacity: 1;
        visibility: visible;
    }
}

.fadeinout {
    opacity: 0;
    visibility: hidden;
    animation: 5s fadeinout;
}

I would also say that in the example you posted, the element is visible with full opacity before and after the animation, so it has a sharp transition which could be problematic. The above example should be more stable in this regard.

from rmlui.

archydragon avatar archydragon commented on July 26, 2024

Single set of keyframes works very well for me! Sorry, I'm not really proficient with CSS animations so just copy-pasted fadein and fadeout from samples code originally :D

The documentation at https://mikke89.github.io/RmlUiDoc/pages/rcss/animations_transitions_transforms.html states that "Multiple animations can be specified on the same element by using a comma-separated list", so yep, it's just a question of feature parity with browser CSS behavior people like me might expect. Probably something for 7.0...

from rmlui.

mikke89 avatar mikke89 commented on July 26, 2024

Looked a bit more into this one again to see if there is a quick way to make it work with multiple animations with the same property on the same element. Unfortunately, it requires quite a bit more work due to some architectural assumptions, especially since different animations can have completely different animation styles (such as repetition count).

For now, I added a warning in this situation, so that users at least know something is going on.

I am closing this issue for now, and instead putting it on my long-term feature list. Certainly would be a nice-to-have feature for the future.

from rmlui.

archydragon avatar archydragon commented on July 26, 2024

Yup, that's fine, thank you very much for the support!

from rmlui.

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.