Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- A LESS mixin for clearing any element within your CSS.
- This means you can avoid any extra classes in your HTML.
- However, this *WILL* bloat your compiled CSS files if you
- use it on a lot of elements, so use with caution.
- Note that you can still add a "clearfix" class to HTML
- elements if you wish: the LESS compiles to a usable CSS
- class too.
- Matt Hill, 2012-06-19
- */
- /* LESS */
- .clearfix {
- &:before,&:after {
- content:""; display:table;
- }
- &:after {
- clear:both;
- }
- zoom:1 /* For old IE, does nothing in other browsers */
- }
- /* HOW TO USE */
- h1 {
- font-size:4em;
- .clearfix;
- }
- /* COMPILED CSS OUTPUT */
- h1 {
- font-size:4em;
- zoom:1
- }
- h1:before,h1:after {
- content:""; display:table;
- }
- h1:after {
- clear:both
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement