New issue
Advanced search Search tips

Issue 849231 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

pre element with line-height: 1.0 and overflow-x: auto gets vertical scrollbar

Project Member Reported by h...@chromium.org, Jun 4 2018

Issue description

Chrome Version: 67.0.3396.62 (Official Build) (64-bit)
OS: glinux

Also repros on Win canary:
69.0.3449.0 (Official Build) canary (64-bit) (cohort: Clang-64)

> What steps will reproduce the problem?

Navigate to data:text/html,<pre style="line-height: 1.0; overflow-x: auto;">Hello, world!</pre>

> What is the expected result?

The pre element should not have a vertical scroll bar.

> What happens instead?

There is a vertical scroll bar (see right side of screen shot).



I'm not an HTML/CSS expert, but I'd expect the pre element to resize to whatever height is necessary to hold its contents. Note that dropping any of line-height or overflow-x makes the scrollbar disappear.


Also verified that Edge (38.14393.2068.0) and Firefox (60.0.1 (64-bit)) don't show a scroll bar for this test case.
 
Screenshot from 2018-06-04 13-24-37.png
15.2 KB View Download

Comment 1 by e...@chromium.org, Jun 4 2018

Cc: jfernan...@igalia.com
Components: -Blink>CSS Blink>Layout>Grid
Labels: -Pri-3 Pri-2
Owner: r...@igalia.com
Status: Assigned (was: Untriaged)

Comment 2 by r...@igalia.com, Jun 5 2018

Cc: kojii@chromium.org r...@igalia.com
Components: -Blink>Layout>Grid Blink>Layout
Owner: ----
Status: Available (was: Assigned)
I'm sorry but I don't see the relationship with Grid Layout here.

It's just a simple <pre> element with "line-height: 1.0",
note that in Firefox you can also scroll a little bit in that case
(like in Chromium) but the scrollbar is not shown in Firefox.

Sign in to add a comment