Skip to content

Instantly share code, notes, and snippets.

@mirisuzanne
Created September 13, 2012 19:33
Show Gist options
  • Save mirisuzanne/3716998 to your computer and use it in GitHub Desktop.
Save mirisuzanne/3716998 to your computer and use it in GitHub Desktop.
Show susy grid and basline on the same element
@mixin show-susy-with-baseline($baseline: rhythm(1)) {
@include grid-background($total-columns, column(), gutter(), $baseline, 0%);
@include background-size(100% $baseline, auto);
@include background-origin(border-box, content-box);
@include background-clip(border-box, content-box);
}
@ijy
Copy link

ijy commented Nov 8, 2012

Thanks Eric, I thought it was probably a mixin but now there's a problem with background-origin. It's saying two arguments were passed but only one was expected. Looking at the compass docs they appear to confirm that. Can this mixin be edited to pass background-origin and background-clip a single argument instead of two?

@mirisuzanne
Copy link
Author

Well, you can either use the master branch of Compass, where -clip and -origin have been fixed to accept any number of layers (as per the css spec), or you can just quote the arguments so they pass together as one. In that case you'll just lose support for older moz/webkit implementations - not a big loss since those browsers are regularly updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment