From e417a818e207a6cca6e2f3c471611673ab836a62 Mon Sep 17 00:00:00 2001 From: Bradley Taunt Date: Sat, 25 May 2024 16:14:03 -0400 Subject: Initial commit for Jekyll testing and conversion, updated --- _posts/2016-11-15-te.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 _posts/2016-11-15-te.md (limited to '_posts/2016-11-15-te.md') diff --git a/_posts/2016-11-15-te.md b/_posts/2016-11-15-te.md new file mode 100644 index 0000000..2c2f3a8 --- /dev/null +++ b/_posts/2016-11-15-te.md @@ -0,0 +1,22 @@ +--- +layout: post +title: "The Wonders of Text Ellipsis" +date: 2016-11-15 +--- + + +A common issue when working with constrained UI elements is text overflowing outside of it's parent or breaking into addition lines (thus breaking the layout). + +This is most commonly seen with the direct and placeholder values for input fields on form elements. For example, the following input placeholder will be cutoff from the user's view: + +[CodePen live example](https://codepen.io/bradleytaunt/pen/OgpzyY/) + +Luckily, 3 simple CSS parameters can fix this. + + input::placeholder { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + +This allows the user to understand there is more content cut out from their current view. It's not ideal to ever have content overflowing outside of the parent container, but if you need to the best workaround is to use text-overflow. -- cgit v1.2.3-54-g00ecf