Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"keyframes" addon doesn't like sheet() #200

Open
TheBosZ opened this issue Aug 6, 2018 · 4 comments
Open

"keyframes" addon doesn't like sheet() #200

TheBosZ opened this issue Aug 6, 2018 · 4 comments

Comments

@TheBosZ
Copy link
Contributor

TheBosZ commented Aug 6, 2018

In process of converting our project from sass, I ran across a problem with how I was implementing Keyframes for an animation.

I was just using sheet() for all my rules, but noticed that the keyframes addon didn't work.

I switched to using rule() and it worked fine.

I thought sheet() was just a fancy wrapper around rule. If it is, it should handle keyframes the same as rule(). If not, maybe note that in the documentation?

@streamich
Copy link
Owner

How do you use it? Can you paste an example?

@TheBosZ
Copy link
Contributor Author

TheBosZ commented Aug 6, 2018

Here's an embed: https://runkit.com/embed/w12vm65kiqky

Note that the .sheet() call generates class names instead of keyframes.

@streamich
Copy link
Owner

I see, currently sheet treats every key at top level as a class name. I suspect this would work, if you nested @keyframes inside a class name:

nano.sheet({
  foo: {
    '@keyframes ...': {}
  }
});

But then it does not make much sense. In any case, I think we can make keyframes work in sheet as a top level key easily.

@TheBosZ
Copy link
Contributor Author

TheBosZ commented Aug 29, 2018

I don't know if I should make a separate post, but the keyframes and virtual addons don't work together. The virtual addon tries to virtualize the keyframes and messes it up.

EDIT: It looks like it's a problem with virtual. I'll make a new ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants