So maybe err on the side of writing defensive CSS… CSS that anticipates issues and knows how to gracefully handle different content scenarios. Maybe an archive of blog posts where each post shows an excerpt of the post content before truncating, but that’s not exactly a use case for text-overflow: ellipse.ĬSS has the tools to make a flexible design that accounts for varying lengths of text. I have a hard time recalling any situation where the text on a page is unimportant or without purpose to the extent that I’d be cool cutting if off at any arbitrary point determined by a CSS property. But I’d probably argue, like Eric, that the design should adapt to the content rather than the other way around. That’s cool as long as you know what’s happening and it’s intended.īut here’s what Eric says that made me want to share this:ĭon’t constrain the content to fit your design, make your CSS flexible to handle longer words gracefully.Īgain, you might want to conform content to the design. Once it’s gone, it’s gone ( although screen readers seem to announce it). And if that text is simply not there, users will miss it, even if it is the best and most well-crafted call to action ever published to the web.Įric points out that there is no way to make the text truncated by text-overflow: ellipsis visible. Text that inadvertently overflows a container is lost in the sense that it’s simply not there. The ultimate goal is to prevent “losing” data, something that can certainly happen in CSS. Maybe only a few, but legitimate nonetheless. As Eric says, there are legitimate use cases for truncating text. I think “… if used in certain situations” belongs there, but it certainly makes for a better blog post title without it. But once you change the viewport or resize the text, the end of the text disappears. However, I often see it used on items like buttons or even form labels to make them look nicer(?) or when aligning them vertically. To preserve more space for the title, you constrain the description to one line on small viewports to the one-line and you repeat the description on the detail page for this item. For example, you might have a table with titles and descriptions. There are a few legitimate use cases for this technique. On the Formatting toolbar, enter a size in the Font Size box. Hold down the mouse button and drag the handle to change the object. To resize the object proportionally, select a corner handle, and hold down SHIFT, and then proceed to step 4. On the Format menu, point to AutoFit Text, and do one of the following: To connect more text boxes to the story, repeat steps 3 and 4. This text box is now connected to the first box and any text in the overflow now appears in the next box. Ĭlick in the text box you want as the next in the story. On the Connect Text Boxes toolbar, click Create Text Box Link. In your publication, click where you want one corner of the text to appear, and then drag diagonally until you have the box size you want. On the Text Box Tools Format tab, enter a size in the Font Size box. To change the text size for several words or a few characters, highlight the text to select it. To change the text size for a single word, place the insertion point within that word. Hold down the mouse button and drag the handle to resize the object. To stretch the object, select a top, bottom, or side handle, and then proceed to step 4. To resize the object proportionally, select a corner handle, and hold down Shift, and then proceed to step 4. Position the mouse pointer over one of the handles until you see the Resize pointer. To shrink or expand text to fit in the text box when you resize the box, click Best Fit. To reduce the point size of text until there is no text in overflow, click Shrink Text on Overflow. On the Text Box Tools Format tab, click Text Fit, and do one of the following: If you run out of room in the second box you can link to another text box, and the text will flow through all three boxes. Now as you add text, words flow from one text box to another. The overflow text will appear in the new text box. You can link text boxes so that the overflow text flows from one box to another.Ĭlick Home > Draw Text Box, and drag the cross shaped cursor to draw a box where you want text.Ĭlick the overflow indicator and your cursor becomes a pitcher. When a text box has too much text, a little box with ellipses appears in the lower right of the text box. Move text from the overflow into another text box
0 Comments
Leave a Reply. |