Don't set display for replaced text -- just use the container's default display. Also, some small refactoring.

This commit is contained in:
Chris Eppstein 2008-10-03 10:57:25 -07:00
parent 2cc690dc6a
commit 156b896d97

View File

@ -1,8 +1,7 @@
// Hides html text and replaces it with an image. // Hides html text and replaces it with an image.
=replace-text( !img, !x = "50%", !y = "50%" ) // If you use this on an inline element, you will
:display block // need to change the display to block or inline-block.
:text-indent -9999em =replace-text( !img, !x = 50%, !y = 50% )
:overflow hidden :text-indent -9999em
:background-image = url(!img) :overflow hidden
:background-position = !x !y :background= url(!img) no-repeat scroll !x !y
:background-repeat no-repeat