Skip to content

Instantly share code, notes, and snippets.

@maxxscho
Created November 7, 2012 13:35
Show Gist options
  • Save maxxscho/4031610 to your computer and use it in GitHub Desktop.
Save maxxscho/4031610 to your computer and use it in GitHub Desktop.
LESS: Safari margin bugfix
// Legend Safari fix
.legend-margin-fix(@selector, @margin) {
(~"@{selector}") {
margin-bottom: @margin;
}
(~"@{selector} + *") {
-webkit-margin-top-collapse: separate;
margin-top: @margin;
}
}
// Usage
.legend-margin-fix(legend, 20px);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment