Commit 6f073edc authored by Mark Otto's avatar Mark Otto Committed by Mark Otto
Browse files

Add .text-truncate class. We already had a mixin and documented the class, so this fixes that.

parent cfb383cc
Showing with 11 additions and 1 deletion
+11 -1
......@@ -42,14 +42,20 @@ Prevent text from wrapping with a `.text-nowrap` class.
</div>
{% endexample %}
For longer content, you can add a `.text-truncate` class to truncate the text with an ellipsis.
For longer content, you can add a `.text-truncate` class to truncate the text with an ellipsis. **Requires `display: inline-block` or `display: block`.**
{% example html %}
<!-- Block level -->
<div class="row">
<div class="col-2 text-truncate">
Praeterea iter est quasdam res quas ex communi.
</div>
</div>
<!-- Inline level -->
<span class="d-inline-block text-truncate" style="max-width: 150px;">
Praeterea iter est quasdam res quas ex communi.
</span>
{% endexample %}
## Text transform
......
......@@ -47,3 +47,7 @@
.text-hide {
@include text-hide();
}
.text-truncate {
@include text-truncate();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment