Created
September 13, 2012 19:33
-
-
Save mirisuzanne/3716998 to your computer and use it in GitHub Desktop.
Show susy grid and basline on the same element
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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); | |
} |
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?
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
Totally needed this, thanks :)