С момента выхода последней версии Firefox Nightly (35.0a1) у меня возникла проблема с text-overflow: ellipsis
внутри контейнера flexbox с flex-direction: row
, причем каждый столбец имеет ширину 50%.Эллипсис в контейнере flexbox
Демо:
.container {
width: 300px;
background: red;
}
.row {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.column {
flex-basis: 50%;
}
.column p {
background: gold;
/* Will not work in Firefox Nightly 35.0a1 */
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
<div class="container">
<div class="row">
<div class="column">
<p>Captain's Log, Stardate 9529.1: This is the final cruise of the starship Enterprise under my command. This ship and her history will shortly become the care of another crew. To them and their posterity will we commit our future. They will continue the voyages we have begun and journey to all the undiscovered countries boldly going where no man, where no one has gone before.</p>
</div>
<div class="column">
<p>Captain's Log, Stardate 9529.1: This is the final cruise of the starship Enterprise under my command. This ship and her history will shortly become the care of another crew. To them and their posterity will we commit our future. They will continue the voyages we have begun and journey to all the undiscovered countries boldly going where no man, where no one has gone before.</p>
</div>
</div>
</div>
В Nightly текст будет течь вне контейнера, а не добавлять к ...
в конце. В Chrome и Firefox Stable он работает по назначению.
На webkist кажется, хорошо, но если вам нужно ваше решение работает кросс-браузер, пожалуйста, рассмотрите использование решений JS как HTTP: // dotdotdot .frebsite.nl/ – GibboK
Этот вопрос был отмечен как дубликат, но дубликат чего? Я считаю, что это [этот] (http://stackoverflow.com/questions/12022288/how-to-keep-a-flex-item-from-overflowing-due-to-its-text), но я нахожу текущий нить проще читать. – Tibo