Skip to content

Instantly share code, notes, and snippets.

@alecperkins
Created April 6, 2012 21:06
Show Gist options
  • Save alecperkins/2322939 to your computer and use it in GitHub Desktop.
Save alecperkins/2322939 to your computer and use it in GitHub Desktop.
+postclear Compass mixin
// Adds a pseudo element :after that clears floats, preventing them from riding
// up into the element, while still allowing the element to wrap around floats
// before it. This is useful for ensuring floating elements remain in place,
// vertically, when the non-floating elements are too short to push them down.
=postclear($side: both)
&:after
content: " "
display: block
clear: $side
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment