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

Introduced shortcut clearfix mixins, so that clearfixing from media queries becomes possible without using the inconvenient main mixin #34

Open
wants to merge 1 commit into
base: 1.x.x
Choose a base branch
from

Conversation

lolmaus
Copy link
Contributor

@lolmaus lolmaus commented Aug 18, 2013

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:

.region
  @extend %clearfix-micro

.block
  @media (min-width: 400px)
    +clearfix-micro

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?

Snugug added a commit that referenced this pull request Aug 27, 2013
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

Successfully merging this pull request may close these issues.

None yet

1 participant