nib
nib copied to clipboard
What are hide-text() and replace-text() for?
I noticed these undocumented mixins and I wanted to add them to the docs. However, I'm not actually sure how people use them. I noticed they're copied from Compass, but their docs don't really explain the use case either. Any insights?
Same for color-image(color)
. What does it do?
For hide-text, see #106 for a bit of relevant discussion... the idea is if you want text to be in the element, because it belongs there for content-related reasons (like screen-readers & search-engines & text-based browsers), but in browsers you want to hide it for style reasons... like replacing it with an image (which brings me to replace-text
).
For replace-text, see #107 .. It just augments hide-text with background-setting abilities. Back before we had powerful text-styling abilities (like text-shadows & easy-to-use font support), replacing text with an image was actually a common thing to do. Here's an example.
Nowadays, doing this is just about inexcusable, so we could probably deprecate replace-text. hide-text might still be useful tho