Are there any alternatives for -webkit-box-orient?
I need it for the following class:
.max-2-lines{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2; /* number of lines to show */
-webkit-box-orient: vertical;
}
However i can see here that only few browsers support that property
Actually you are using the old implementation of line-clamp that require the use of -webkit-box and -webkit-box-orient.
In the near future you will only need to use the line-clamp property:
The
line-clampproperty is a shorthand for themax-lines,block-ellipsis, andcontinueproperties.It allows limiting the contents of a block container to the specified number of lines; remaining content is fragmented away and neither rendered nor measured. Optionally, it also allows inserting content into the last line box to indicate the continuity of truncated/interrupted content. ref
You can also check the Legacy compatibility section for more information
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With