diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dad4dbe35..f949ea959a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ * Separate Normalize.css from the rest of the CSS (#1160). * Improve `console.log` protection (#1107). * Replace hot pink text selection color with a neutral color. -* Change image replacement technique. +* Change image replacement technique (#1149). * Code format and consistency changes (#1112). * Rename CSS file and rename JS files and subdirectories. * Update to jQuery 1.8 (#1161). diff --git a/css/main.css b/css/main.css index 22a7f358f5..34d6e85271 100644 --- a/css/main.css +++ b/css/main.css @@ -130,11 +130,18 @@ textarea { */ .ir { - border: 0; - font: 0/0 a; - text-shadow: none; - color: transparent; background-color: transparent; + border: 0; + overflow: hidden; + /* IE 6/7 fallback */ + *text-indent: -9999px; +} + +.ir:before { + content: ""; + display: block; + width: 0; + height: 100%; } /* diff --git a/doc/css.md b/doc/css.md index b56e9ca3c0..d8437e46aa 100644 --- a/doc/css.md +++ b/doc/css.md @@ -40,9 +40,10 @@ You are free to modify or add to these base styles as your project requires. #### `.ir` -Add the `.ir` class to any element you are applying image-replacement to. Be -sure to include `background-image: url(pathtoimage.png);` for that specific -element so that image replacement can occur. +Add the `.ir` class to any element you are applying image-replacement to. When +replacing an element's content with an image, make sure to also set a specific +`background-image: url(pathtoimage.png);`, `width`, and `height` so that your +replacement image appears. #### `.hidden`