clearfix.styl 763 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * The Magnificent Micro Clearfix
  3. *
  4. * Useful for clearing floats without structural markup.
  5. * Prevents margin-collapsing on child elements in most cases.
  6. *
  7. * Known issues:
  8. *
  9. * 1. For IE 6/7 when applied to an element that contains only left-floated
  10. * children the bottom margin on child elements will be collapsed.
  11. *
  12. * 2. For Firefox versions prior to 3.5 when applied to the first child element
  13. * of body, and the element does not have non-zero padding, extra space will
  14. * appear between the body and the first child.
  15. *
  16. * See http://nicolasgallagher.com/micro-clearfix-hack/
  17. * and http://j.mp/bestclearfix
  18. *
  19. */
  20. clearfix()
  21. &:before
  22. &:after
  23. content: ""
  24. display: table
  25. &:after
  26. clear: both
  27. zoom: 1 if support-for-ie