-
Notifications
You must be signed in to change notification settings - Fork 67
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
.animate mixin? #24
Comments
I'd appreciate that. |
Hi @lougreenwood, Apologies for the delayed response. That seems like a decent solution. I would just warn that by using mixins this way you're bloating your css output (always look at the output when using sass). Let's say you end up using the mixin across 4 separate modules including the base .animate class. Your output css is going to have 4 sets of the same css rules duplicated for each of those separate css classes. I'm more a fan of using the modular class chaining approach in my markup but it's just that, a preference. If you feel like this offers users of this library greater flexibility then I have no issue with you submitting a pull request with the proposed changes. You can use the existing helpers/_mixins.scss file to declare the new mixin rule and just include it in the .animate class in _base.scss. Thanks for your input :-) |
Hey @lougreenwood , Turns out @carlos-avila has submitted a custom mixin PR here: #27 If this is what you're looking for then I'd be happy to review it and merge it in (updating the docs also) Let me know what you think. |
hey @tgdev sorry for the even longer delayed response :) I just took a look at the PR, it does look very useful, but for some of my use cases, I need to apply a different animation class on open close ( I've added a single comment to the PR, just pointing out that base-duration is compatible with CSS custom properties (just like #34), otherwise looks good and useful for me. Back to the main topic of this issue, I'm currently using a hacky homebrew mixin for setting the Cheers! |
Hi,
I'm trying to use the library to assign animation to certain classes by default, for example, I want a specific animation to be applied to all modals.
However, I'm trying to avoid the needs to add 'animate pulse' to the markup anywhere a modal is displayed. One solution to this is to @extend .animate class in my modal class, however, we all know that @extend has issues and @mixin is preferred.
Is there any existing mixing to include the .animate rules in arbitrary sass classes, if not, would you accept a PR where _base defines an animate main and .animate class in base uses this mixing?
Thanks!
The text was updated successfully, but these errors were encountered: