aboutsummaryrefslogtreecommitdiff
path: root/_posts/2016-11-15-te.md
diff options
context:
space:
mode:
authorBradley Taunt <bt@btxx.org>2024-05-25 16:14:03 -0400
committerBradley Taunt <bt@btxx.org>2024-05-25 16:16:54 -0400
commite417a818e207a6cca6e2f3c471611673ab836a62 (patch)
tree664686a365c3d1e73349b5a667fa892f46445fef /_posts/2016-11-15-te.md
Initial commit for Jekyll testing and conversion, updated
Diffstat (limited to '_posts/2016-11-15-te.md')
-rw-r--r--_posts/2016-11-15-te.md22
1 files changed, 22 insertions, 0 deletions
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.