mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-23 20:54:22 +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>
|
</div>
|
||||||
{% endexample %}
|
{% 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 %}
|
{% example html %}
|
||||||
|
<!-- Block level -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-2 text-truncate">
|
<div class="col-2 text-truncate">
|
||||||
Praeterea iter est quasdam res quas ex communi.
|
Praeterea iter est quasdam res quas ex communi.
|
||||||
</div>
|
</div>
|
||||||
</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 %}
|
{% endexample %}
|
||||||
|
|
||||||
## Text transform
|
## Text transform
|
||||||
|
@ -47,3 +47,7 @@
|
|||||||
.text-hide {
|
.text-hide {
|
||||||
@include text-hide();
|
@include text-hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-truncate {
|
||||||
|
@include text-truncate();
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user