Intrinsic width doesn't consider size modifications due to ::first-line pseudo-selector
Reported by
pgrevi...@gmail.com,
Mar 7 2017
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 Steps to reproduce the problem: This is reproducible by having a font-weight property (or another property that changes glyph width) applied to the ::first-line pseudo-element inside a flexible box context. Please see my attachment or visit this JSFiddle: https://jsfiddle.net/Kredit/2bqnLnwb/ What is the expected behavior? I expect all the text to be bold and on the same line, because there is no visible reason why the text should be wrapping on the last word. Internet Explorer and Firefox both behave as expected, with all text bolded and on the same line with the browser window fully maximized. What went wrong? As long as there is more than 1 word in the inner .first-line div, it will be split onto a second line and thus not bolded. Even having "One Two" as the inner text results in a line break being inserted between the words. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 55.0.2883.87 Channel: n/a OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Shockwave Flash 24.0 r0 Maybe this is being caused by the layout engine calculating how wide the flexbox should be before applying the ::first-line styles. font-weight makes the text wider, meaning it would no longer fit inside the original size.
,
Mar 8 2017
Thanks for filing the issue. Able to reproduce the issue on Windows7,Mac-10.12.3 & Linux ubuntu 14.04 using Chrome stable version 56.0.2924.87 and canary 59.0.3033.0 with the steps & JSFiddle mentioned in comment#0. This is Non-regression issue, Observed from M30 #30.0.1549.0 and confirming this issue to get more inputs from Dev team. Please find the attached screencast for reference.
,
Mar 8 2017
,
Mar 8 2017
We are probably measuring min/max widths with the wrong style.
,
Mar 13 2017
,
Dec 26 2017
This issue is not related to Flexbox, just a simple floated element or inline-block has the same problem: https://jsfiddle.net/sqrzyd46/ Changes like font-size or font-family cause similar problems.
,
Dec 26
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 2
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by nyerramilli@chromium.org
, Mar 8 2017