mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-30 22:52:24 +01:00
Add .text-truncate class. We already had a mixin and documented the class, so this fixes that.
This commit is contained in:
parent
cfb383cc01
commit
6f073edc79
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user