Introduced shortcut clearfix mixins, so that clearfixing from media queries becomes possible without using the inconvenient main mixin #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometimes it's necessary to apply clearfixes from inside media queries. But currently Toolkit offers handy clearfix shortcuts only in a form of extendables, and SASS does not allow extending from media queries.
Using the main mixin is kinda burdensome due to the fact that a never used argument goes first and you have to either provide the first argument (
@include clearfix(false, 'micro');
) or provide the name for the second argument (@include clearfix($direct: 'micro');
).So i added a shorthand mixin for every clearfix flavor. Now it's possible to do simply
@include clearfix-micro;
without any arguments and even parentheses.It gets even better in SASS syntax:
PS I think that SASS should allow extending from media queries by simply declaring extendable classes inside CSS media queries. I don't see why that's impossible. Are you with me?