Code Monkey home page Code Monkey logo

Comments (4)

henrikvilhelmberglund avatar henrikvilhelmberglund commented on June 29, 2024

Any reason why you need an object? For an example of custom animations see this: https://uno.antfu.me/play/?html=DwBwBAxgNghgznAvAIgGZQKYA8zuwWggHsowBLAFwwFs5CMA7KgJzBAvwFYAGMKrDgGYspGAzLUYVfAHcyAc3mZkAPgBQYMHMWY1wAPQh1QA&config=PTAEFMGcBsEsDsAuBaAJrSBDARtcz5wAPFOQ0eAe2QCcpEbYBjRcVZWAWwAdKbFIAKC69%2BoAN6hU4AGYJwAYUrw5AcwA0obnUjhEAQUQNY2AK6JYMgJ6btUPQEkmyyLZ16AqlVABfUDJpKTlAAclMqJkhIEMFBYlFEKVlMU2hE6TlCJRVYVQAKcUFQUEQAC3BOcAAuCSLi0Ex4LkwLZRrC%2BvqAa3ArAMxKyHa6zuKAd1zVPCqR0eKQ8QAGAFJNAEZFlYkGRsgZPk4awMQW8DzkAGZpVQBKPwBWLfEd%2BD2Do8oT1jyr8FufHwhdSzYo%2BYFzVCmGgtWAuYZzcaTaahNbRcGjMEgkpcBCqABir3hCImqim1VC4Ewug48GQlHMQKxmLm2ko3HA-FgUCJcxAJWhr32NE4dMYqgQDXgqFA2EwTC6Mjl%2BAAbhgTLA4IgrKBynQmejOs5wgIeaMSWSaiEEJlYKxGXNmfVHZi6jRUtzQABtT0hJimSCIIK0d1AiSgZzQPiWuioEK%2BAC68fRkFKfEQfpNtU6vv9gZFKbTGZCltYJGQ0FUJWIKD4jVU4B1lGVHKqpZQrEw0HtvnRdl0mc9sz7nioeRuBq07gMRkYZgs1jHE%2BHiCcLgKWMgTE75LWADoAEwT4pMVDwS2lIzcIYgKCcXcp4Dd0HjupJwQ%2BG6CIA&css=PQKgBA6gTglgLgUzAYwK4Gc4HsC2YDCAyoWABYJQIA0YAhgHYAmYcUD6AZllDhWOqgAOg7nAB0YAGLcwCAB60cggDYIAXGBDAAUKDBi0mXGADe2sGC704AWgDuCGAHNScDQFYADJ4Dc5sAACtMLKAJ5gggCMLPK2ABR2pPBIcsoAlH4WAEa0yADWTlBYqEw2yFjK3Bpw5LxxAOTllVDoYpSMYgAs3vUZ2gC%2BmsBAA&options=N4IgLgTghgdgzgMwPYQLYAkyoDYgFwJTZwCmAvkA

also see https://github.com/unocss/unocss/blob/main/packages/preset-wind/src/theme.ts for more examples.

from unocss.

robin-dongbin avatar robin-dongbin commented on June 29, 2024

The representation of objects is more intuitive, comfortable, easy to write

from unocss.

henrikvilhelmberglund avatar henrikvilhelmberglund commented on June 29, 2024

If you want the keyframes on separate lines you could do something like

wiggle: `{
          0%, 100% {transform: rotate(-3deg)} 
          50% {transform: rotate(3deg)}
          }`,

I could see objects being useful if we could have something like

animation: {
  pulse: { 
    keyframes: '{0%, 100% {opacity:1} 50% {opacity:.5}}',
    durations: '2s',
    timingFns: 'cubic-bezier(0.4,0,.6,1)',
    counts: 'infinite',
  }
}

but I don't really see the benefit of the Tailwind notation.

from unocss.

zyyv avatar zyyv commented on June 29, 2024

You can try to use this way in unocss-preset-useful.

from unocss.

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.