New issue
Advanced search Search tips

Issue 699194 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Intrinsic width doesn't consider size modifications due to ::first-line pseudo-selector

Reported by pgrevi...@gmail.com, Mar 7 2017

Issue description

UserAgent: 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.

 
Labels: Needs-Milestone
Labels: -Needs-Milestone M-59 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
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.


699194.mp4
347 KB View Download

Comment 3 by r...@opera.com, Mar 8 2017

Components: -Blink>CSS Blink>Layout

Comment 4 by r...@opera.com, Mar 8 2017

We are probably measuring min/max widths with the wrong style.

Comment 5 by e...@chromium.org, Mar 13 2017

Components: -Blink>Layout Blink>Layout>Flexbox
Labels: -Pri-2 Pri-3
Status: Available (was: Untriaged)

Comment 6 by r...@igalia.com, Dec 26 2017

Components: -Blink>Layout>Flexbox Blink>Layout
Summary: Intrinsic width doesn't consider size modifications due to ::first-line pseudo-selector (was: ::first-line pseudo-selector does not behave when inside a flexbox context)
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.
Project Member

Comment 7 by sheriffbot@chromium.org, Dec 26

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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
Labels: Fixed-In-LayoutNG
Status: Available (was: Untriaged)

Sign in to add a comment