Permalink
Browse files

Rename phark to imageReplacement, per Kevin Fitzpatrick.

  • Loading branch information...
1 parent 4c0cb01 commit e93f710b71ba12ff127360eaeee2e7a6f616967f @ndp committed Nov 14, 2010
Showing with 7 additions and 7 deletions.
  1. +1 −1 README.markdown
  2. +2 −2 spec/macros_spec.js
  3. +4 −4 src/macros/macros.js
View
2 README.markdown
@@ -114,7 +114,7 @@ There are a host of pre-made macros that may be useful:
* <code>roundedCorners(radius)</code> -- add rounded corners on all sides
* <code>roundedCorners(side, radius)</code> -- add rounded corners on specified side: <code>'top'</code>, <code>'left'</code>, <code>'bottom'</code> or <code>'right'</code>
* <code>roundedCorners(corner, radius)</code> -- add rounded corners to a specified corner: <code>'tl'</code>, <code>'tr'</code>, <code>'bl'</code> or <code>'br'</code>
-* <code>phark(width, height, img, imgXPosition=0, imgYPosition=0)</code> -- standard phark image replacement with optional background image offset.
+* <code>imageReplacement(width, height, img, imgXPosition=0, imgYPosition=0)</code> -- phark image replacement with optional background image offset.
* <code>boxShadow([xoffset, yoffset], radius, color)</code>
* <code>verticalCentering(height)</code> and <code>horizontalCentering(width)</code> -- center using the top 50% / margin-top -width/2 technique. See http://stackoverflow.com/questions/148251/css-centering-tricks
* <code>clearfix()</code> -- standard clearfix
View
4 spec/macros_spec.js
@@ -36,10 +36,10 @@ describe('macros', function() {
});
- describe('phark', function() {
+ describe('imageReplacement', function() {
it('should throw exception if not given enough parameters', function() {
- expect(function() {phark()}).toThrow("phark() requires width, height and img");
+ expect(function() {imageReplacement()}).toThrow("imageReplacement() requires width, height and img");
})
});
View
8 src/macros/macros.js
@@ -84,20 +84,20 @@ function boxShadow(offsetOrDirection, radius, color) {
}
/**
- Basic Phark image replacement, found here:
+ Basic Phark image replacement, defined here:
http://www.mezzoblue.com/tests/revised-image-replacement/
Supports sprites with option image positioning parameters (which default to 0).
- These will generally be negative.
+ These values will (generally) be negative.
width: width in pixels
height: height in pixels
img: url for the image, suitable for putting into a url() wrapper
*/
-function phark(width, height, img, imgXPosition, imgYPosition) {
+function imageReplacement(width, height, img, imgXPosition, imgYPosition) {
if (typeof width == 'undefined' || typeof height == 'undefined' || typeof img == 'undefined') {
- throw "phark() requires width, height and img";
+ throw "imageReplacement() requires width, height and img";
}
return {
display: 'block',

0 comments on commit e93f710

Please sign in to comment.