Home >Web Front-end >CSS Tutorial >Why Doesn't Firefox Support `text-overflow: ellipsis`, and Are There Any CSS-Only Workarounds?
text-overflow:ellipsis in Firefox 4
text-overflow:ellipsis; CSS property may be Microsoft’s first contribution to the web One of the few things that goes right. All other browsers except Firefox now support it.
Firefox developers have been debating it since 2005, but despite the obvious need for it, they don't seem to have actually implemented it (even the experimental -moz- implementation suffices).
A few years ago, someone figured out how to hack Firefox 3 to support ellipses. This hacker uses the -moz-binding feature to achieve it, thus using XUL. Quite a few websites are using this hack now.
Bad news? Firefox 4 is removing the -moz-binding feature, which means this hack will no longer work.
So once Firefox 4 is released (which I hear is later this month), we'll be back to it not being able to support this feature.
So my question is: Are there any other workarounds? (I try to avoid using Javascript solutions if possible.)
EDIT
There are a lot of backers, so I'm obviously not the only one wondering, but I've got so far There's only one answer, which is basically "use javascript". I'd still like to find a solution that either doesn't require JS at all, or at worst just uses it as a fallback when a CSS feature doesn't work. So I'm going to put a bounty on this question in case someone finds the answer somewhere.
EDIT
Update: Firefox has entered rapid development mode, but despite the release of FF5, this feature is still not supported. Now that most users have upgraded from FF3.6, hacking is no longer a solution. The good news I've heard is that it may be added to Firefox 6, which should be released within a few months according to the new version schedule. If so, then I guess I could wait, but it's a shame they couldn't fix it sooner.
Final Edit
I see that the ellipsis feature has finally been added to the "Aurora Channel" (i.e. the development version) of Firefox. This means it should be released now as part of Firefox 7, which is expected to be released in late 2011. What a relief.
Release Notes: https://developer.mozilla.org/en-US/Firefox/Releases/7
The above is the detailed content of Why Doesn't Firefox Support `text-overflow: ellipsis`, and Are There Any CSS-Only Workarounds?. For more information, please follow other related articles on the PHP Chinese website!