According to https://developer.mozilla.org/En/CSS/Text-overflow and http://dev.w3.org/csswg/css3-ui/#text-overflow there's currently only the possibility to clip strings at the beginning and their end.
Though for recognizability it's sometimes better to crop the string in the middle.
Firebug is using that principle for file names and URLs and it works well. Though the strings are not cropped dynamically. So there's a problem when the containing element is resized. See http://code.google.com/p/fbug/issues/detail?id=4864.
With the current implementation this would be cropped to something like:
So the file types and names can't be destinguished.
If the truncation could be specified to happen in the middle of the word, this would look like:
Thereby the most characterizing part is obviously the file extension.
So to keep this visible there could be another option to specify the number of characters to prevent from being cropped (at the left and the right side).
So if there's just space for e.g. 5 characters and we specified not to crop the right 3 characters, the result would look like this:
I imagine the CSS syntax to be specified like this:
text-overflow: clip ellipsis clip 3;
*** This bug has been marked as a duplicate of bug 740910 ***