Introduced replace-text mixin for showing images in place of HTML text.

This commit is contained in:
Andrew Vit 2008-10-02 11:47:01 -07:00 committed by Chris Eppstein
parent 278cda2ed6
commit 94083e82e1
3 changed files with 10 additions and 0 deletions

View File

@ -80,6 +80,7 @@ frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass
frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass
frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass
frameworks/compass/stylesheets/compass/utilities/text/_nowrap.sass frameworks/compass/stylesheets/compass/utilities/text/_nowrap.sass
frameworks/compass/stylesheets/compass/utilities/text/_replacement.sass
frameworks/compass/templates/project/grid.png frameworks/compass/templates/project/grid.png
frameworks/compass/templates/project/ie.sass frameworks/compass/templates/project/ie.sass
frameworks/compass/templates/project/print.sass frameworks/compass/templates/project/print.sass

View File

@ -1 +1,2 @@
@import text/nowrap.sass @import text/nowrap.sass
@import text/replacement.sass

View File

@ -0,0 +1,8 @@
// Hides html text and replaces it with an image.
=replace-text( !img, !x = "50%", !y = "50%" )
:display block
:text-indent -9999em
:overflow hidden
:background-image = url(!img)
:background-position = !x !y
:background-repeat no-repeat