Live data from Hacker News

CSS "text-overflow: ellipsis;" finally landed in Gecko

bugzilla.mozilla.org

1–10 of 28 posts

Re: CSS "text-overflow: ellipsis;" finally landed in Gecko

#4
"text-overflow: ellipsis" is a great start, but it's really too bad it only applies to individual lines of text (via "white-space: nowrap").

it would be very useful if we had a property to truncate text when it reaches the end of a container with a fixed height. so if the container is 3.5 lines tall, 3 lines should be shown with an ellipsis at the last character. bonus points if we can specify a separator, so that the ellipsis will only be applied after the last whole word (space), line (line break), or just character.

Re: CSS "text-overflow: ellipsis;" finally landed in Gecko

#6

Yep, that means that every major browser (including IE6!) supports it now. As soon as FF6 has spread, we can begin to make real use of it :).

If everyone had that attitude, we'd still be stuck at HTML 3.2... Yes, it needs time to catch up, sure, but in a few years it will be useful to have.

Re: CSS "text-overflow: ellipsis;" finally landed in Gecko

#7
jQuery Mobile makes extensive use of this (though I've turned it off on a mobile app I'm making).

CanIUse shows that Firefox is the last browser to support ellipsis [1] and comparing Firefox 7 to Chrome 14 [2] shows a few other things that some web developers would like.

Firefox also has quite a long way to go on HTML5 forms [3].

[1] http://www.caniuse.com/#search=overflow [2] http://www.caniuse.com/#compare=y&b1=firefox+7&b2=ch... [3] http://wufoo.com/html5/

Re: CSS "text-overflow: ellipsis;" finally landed in Gecko

#8

Yep, that means that every major browser (including IE6!) supports it now. As soon as FF6 has spread, we can begin to make real use of it :).

It's just a cosmetic feature, so you can use it already. Older browsers won't show the ellipsis in that case but who cares. Graceful fallback is automatic.

Re: CSS "text-overflow: ellipsis;" finally landed in Gecko

#9

Yep, that means that every major browser (including IE6!) supports it now. As soon as FF6 has spread, we can begin to make real use of it :).

I've been maintaining a jQuery plugin for the text-overflow property for a while. It works well in most cases: http://www.bramstein.com/projects/text-overflow/

You can see a test page here, which only works in Firefox due to the feature detection: http://www.bramstein.com/projects/text-overflow/examples.htm...

Post reply on HN