From bf52c764706e79d6af6f1bb3699b1ea47150d0b3 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 17 Jan 2011 11:54:58 -0800 Subject: [PATCH] Rename the sprite-position mixin in compass/utilities/sprites/base to sprite-background-position in order to avoid a naming conflict with the older sprite-image module. --- doc-src/content/CHANGELOG.markdown | 3 +++ .../compass/stylesheets/compass/utilities/sprites/_base.scss | 4 ++-- lib/compass/sprites.rb | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc-src/content/CHANGELOG.markdown b/doc-src/content/CHANGELOG.markdown index 567b9b46..0cfa6243 100644 --- a/doc-src/content/CHANGELOG.markdown +++ b/doc-src/content/CHANGELOG.markdown @@ -20,6 +20,9 @@ The Documentation for the [latest preview release](http://beta.compass-style.org subcommand. When provided, the default variables for overriding the sprite behavior are not created. Instead, you would change the call to `sprite-map()` to customize your sprite map. +* Rename the `sprite-position` mixin in the new `sprite/base` module to + `sprite-background-position` in order avoid a naming conflict with the old + sprite module. 0.11.beta.0 (01/09/2011) ------------------------ diff --git a/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss b/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss index bc749162..650431c5 100644 --- a/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss +++ b/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss @@ -8,7 +8,7 @@ // Set the background position of the given sprite `$map` to display the // sprite of the given `$sprite` name. You can move the image relative to its // natural position by passing `$offset-x` and `$offset-y`. -@mixin sprite-position($map, $sprite, $offset-x: 0, $offset-y: 0) { +@mixin sprite-background-position($map, $sprite, $offset-x: 0, $offset-y: 0) { background-position: sprite-position($map, $sprite, $offset-x, $offset-y); } @@ -18,7 +18,7 @@ // // background: $map no-repeat; @mixin sprite($map, $sprite, $dimensions: false, $offset-x: 0, $offset-y: 0) { - @include sprite-position($map, $sprite, $offset-x, $offset-y); + @include sprite-background-position($map, $sprite, $offset-x, $offset-y); @if $dimensions { @include sprite-dimensions($map, $sprite); } diff --git a/lib/compass/sprites.rb b/lib/compass/sprites.rb index 70428fbb..c3ac2d55 100644 --- a/lib/compass/sprites.rb +++ b/lib/compass/sprites.rb @@ -63,7 +63,7 @@ $#{name}-repeat: no-repeat !default; // Move the background position to display the sprite. @mixin #{name}-sprite-position($name, $offset-x: 0, $offset-y: 0) { - @include sprite-position($#{name}-sprites, $name, $offset-x, $offset-y) + @include sprite-background-position($#{name}-sprites, $name, $offset-x, $offset-y) } // Extends the sprite base class and set the background position for the desired sprite.