5 characters and we specified not to crop the right 3 characters, the result would look like this:īecause there will be some more values available for the text-overflow property, it would make sense to convert it to a shorthand property consisting of the following longhand properties: So to keep it visible there could be another option to specify the number of characters to prevent from being cropped (at the left and the right side). Regarding this use case the most characterizing part is obviously the file extension. If the truncation could be specified to happen in the middle of the word, this would look like: So the file types and names can't be destinguished. With the current implementation this could be cropped to something like this: There's also a screenshot of how this currently looks like in Firebug. So there's a problem when the containing element is resized. Though the strings are not cropped dynamically. Text-overflow: ( clip | ellipsis | ) įirebug is using that principle for file names and URLs and it works well. So its syntax would look something like this: To do so the text-overflow property could be extended to allow defining a third value for the middle-string replacement and values defining the lengths of the string parts to preserve. To keep the recognizability high even on small strings, there should be a way to define parts of the content, which should be preserved, i.e. According to the description of text-overflow at Mozilla and the definition in the current W3C CSS UI module spec there's currently only the possibility to clip strings at the beginning and their end.įor recognizability it's sometimes better to crop the string in the middle.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |