chriseppstein/compass — Issue #756: @hide-text optimization
Author: mathiasschopmans
Created: 2012-03-07 09:05:52+00:00
State: open

// new technique
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}

Pros:
- Really long strings of text will never flow into the container because they always flow away from the container.
- Performance is dramatically improved because a 9999px box is not drawn. Noticeably so in animations on the iPad 1.

see: http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/