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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions compass/stylesheets/toolkit/_clearfix.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,39 @@ $toolkit-clearfix: true;
//
// From http://www.css-101.org/articles/clearfix/latest-new-clearfix-so-far.php
//////////////////////////////
%clearfix-legacy {
@mixin clearfix-legacy {
@include clearfix(false, 'legacy');
}

%clearfix-legacy {
@include clearfix-legacy;
}

//////////////////////////////
// Micro Clearfix
//
// For when you need old IE support, but not concerned with old Firefox
// From http://nicolasgallagher.com/better-float-containment-in-ie/
//////////////////////////////
%clearfix-micro {
@mixin clearfix-micro {
@include clearfix(false, 'micro');
}

%clearfix-micro {
@include clearfix-micro;
}

//////////////////////////////
// Modern Clearfix
//
// Clearfix for modern browsers, especiall when using border-box
//
// From http://www.css-101.org/articles/clearfix/latest-new-clearfix-so-far.php
//////////////////////////////
%clearfix {
@mixin clearfix-modern {
@include clearfix(false, 'modern');
}
}

%clearfix, %clearfix-modern {
@include clearfix-modern;
}