From 7e07e55f13c37b8424c8b0ffeaa0613f22cfa153 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Thu, 30 Jun 2011 16:35:22 -0700 Subject: [PATCH] Pass through offset parameters to the :hover, :target, and :active magic sprite selectors. --- .../stylesheets/compass/utilities/sprites/_base.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss b/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss index c346e181..d40740dc 100644 --- a/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss +++ b/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss @@ -30,18 +30,18 @@ $disable-magic-sprite-selectors:false !default; @include sprite-dimensions($map, $sprite); } @if not $disable-magic-sprite-selectors { - @include sprite-selectors($map, $sprite, $sprite); + @include sprite-selectors($map, $sprite, $sprite, $offset-x, $offset-y); } } // Include the selectors for the `$sprite` given the `$map` and the // `$full-sprite-name` // @private -@mixin sprite-selectors($map, $sprite-name, $full-sprite-name) { +@mixin sprite-selectors($map, $sprite-name, $full-sprite-name, $offset-x: 0, $offset-y: 0) { @each $selector in $sprite-selectors { @if sprite_has_selector($map, $sprite-name, $selector) { &:#{$selector}, &.#{$full-sprite-name}_#{$selector}, &.#{$full-sprite-name}-#{$selector} { - @include sprite-background-position($map, "#{$sprite-name}_#{$selector}"); + @include sprite-background-position($map, "#{$sprite-name}_#{$selector}", $offset-x, $offset-y); } } }