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

Include keyframes in mixins (scss) #61

Open
FlTr opened this issue Mar 18, 2015 · 6 comments
Open

Include keyframes in mixins (scss) #61

FlTr opened this issue Mar 18, 2015 · 6 comments
Milestone

Comments

@FlTr
Copy link

FlTr commented Mar 18, 2015

Think it would be great if the keyframes directives are included in the mixins.

@mixin pulse {
  @at-root {
    @include keyframes( #{$nameSpace}-pulse ) {
      // ...
    }
  }

 @include hacks();

  // ...
}

For individual usage a _hover.scss partial would be nice to prevent Copy&Paste actions.

@artiswilliams
Copy link

I agree. I don't like seeing all that keyframe code in my css when I'm not using the effect.

If the keyframe directive is in the mixin and $includeClasses is set to false then no css is generated unless a mixin is actually used somewhere.

@IanLunn IanLunn added this to the 2.0.3 milestone Mar 23, 2015
@IanLunn
Copy link
Owner

IanLunn commented Mar 23, 2015

Agreed. I'll add this to the next release. Any objection to this being done without the use of @at-root now it's not necessary in Sass 3.4+

Does LESS have a similar directive?

@FlTr
Copy link
Author

FlTr commented Mar 24, 2015

Not sure if it works right without @at-root.

Sorry, no experience with LESS

@qzminski
Copy link

Hey @IanLunn any news on this? It would be a really great improvement.

@IanLunn
Copy link
Owner

IanLunn commented Sep 25, 2017

@qzminski I plan to add this as part of 3.0 but no date for this.

@Hussseinkizz
Copy link

The docs for how to use in sass for a beginner like me are totally not well explained, like how do I actually use the effect?

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

No branches or pull requests

5 participants