half-leading is missing when using -webkit-line-clamp for text ellipsis
Reported by
luyuan.c...@gmail.com,
Mar 27 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 Example URL: http://jsbin.com/yofiku/edit?html,css,output Steps to reproduce the problem: 1. Create a block element and type some text in it. 2. Set a larger line-height. 3. Use display:-webkit-box, -webkit-line-clamp:1, -webkit-box-orient:vertical, overflow:hidden on the block element. 4. Make sure '...' is display. 5. We can see the half-leading on the bottom of the block element is missing. New height is not correct. What is the expected behavior? The half-leading on the bottom is showing. What went wrong? In third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp getHeightForLineCount function Use lineBottomWithLeading() instead of lineBottom() Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? No Does this work in other browsers? No This is a blink only bug. Chrome version: 55.0.2883.87 Channel: stable OS Version: 10.12.3 Flash Version: Shockwave Flash 24.0 r0
,
Mar 27 2017
,
Mar 27 2017
It doesn't work with flexbox, the implementation of line clamp is in LayoutDeprecatedFlexibleBox class.
,
Mar 27 2017
We're trying to remove support for the non-standard -webkit-line-clamp and replace it with something that has full standard and browser support. As such we are unlikely to further enhance or fix -webkit-line-clamp at this time. |
|||
►
Sign in to add a comment |
|||
Comment 1 by tkent@chromium.org
, Mar 27 2017