[css3-ui] text-overflow should always crop the text when it doesn't fit into the container

The current definition of text-overflow[1] says this:

"Text can overflow for example when it is prevented from wrapping (e.g. due
to ‘white-space:nowrap’ or a single word is too long to fit)."

This excludes vertically overflowing text and horizontally overflowing text
that doesn't match these two rules, which is probably the most common use
case for this property. (keyword: texts with [more...] links)

Example:
<style>
#test {
  width: 100px;
  height: 40px;
  border: 1px solid green;
  overflow: hidden;
  text-overflow: ellipsis;
}
</style>

<p id="test">Lorem ipsum dolor sit amet, consectetur adipisicing elit,</p>

So you would expect the parts of the text that only partly fit into the
container not to be displayed but instead see the ellipsis at the end of
it. See the attached screenshots for an illustration.

Sebastian

Received on Wednesday, 17 July 2013 08:21:01 UTC