aboutsummaryrefslogtreecommitdiff
path: root/posts/te.md
diff options
context:
space:
mode:
authorBradley Taunt <bt@btxx.org>2024-07-02 14:28:49 -0400
committerBradley Taunt <bt@btxx.org>2024-07-02 14:28:49 -0400
commitdc6db80fa72286704849ef61ee0e5ccb5841cb09 (patch)
tree9235d796229d49211c27a07b9d18585d503baa94 /posts/te.md
parent088c87bcb58be576308da503d4f11a68843c5013 (diff)
Conversion to barf for testing purposes
Diffstat (limited to 'posts/te.md')
-rw-r--r--posts/te.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/posts/te.md b/posts/te.md
new file mode 100644
index 0000000..1950c74
--- /dev/null
+++ b/posts/te.md
@@ -0,0 +1,19 @@
+# The Wonders of Text Ellipsis
+
+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.