float: inline-start with line-clamp?

Hey everyone. I was wondering if it's somehow possible to combine float: inline-start with a line-clamp Here's a codepen illustrating the issue: https://codepen.io/thevinter/pen/ogXezKB Basically I would like to be able to set the line-clamp and still have the text wrap around the floating element, but this doesnt seem to work. I assume it has to do with the fact that line-clamp wants a block context. Are there easy ways around this?
3 Replies
vinter.
vinter.OP6mo ago
Also well, given the generally very little support for line-clamp, what would be the best way to do this without it?
vinter.
vinter.OP6mo ago
Playing a bit around and I noticed that I theoretically can put the line-clamp on the parent
No description
vinter.
vinter.OP6mo ago
It still shows extra text but the ellipsis are correct Which I can then remove with something like
.clip {
height: calc(5 * line-height);
overflow: clip;
}
.clip {
height: calc(5 * line-height);
overflow: clip;
}
but this seems pretty cursed

Did you find this page helpful?