Display issue with overflow:visible in inline-block

RESOLVED INVALID

Status

()

Core
Layout: Block and Inline
--
enhancement
RESOLVED INVALID
6 years ago
6 years ago

People

(Reporter: Laurent Martelli, Unassigned)

Tracking

10 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Created attachment 636752 [details]
bug.html

User Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.5) Gecko/20100101 Firefox/10.0.5 Iceweasel/10.0.5
Build ID: 20120605133945

Steps to reproduce:

See attached file. When you hover on the buggy elements, it causes text's baseline to be aligned with bottom of other inline-block elements.
It does not happen if overflow is statically set to visible (see OK1), or if vertical-align is set to top or bottom (see OK2).
I've also tested with 13.0.1, it's the same.
Attachment #636752 - Attachment mime type: text/plain → text/html
FWIW, Opera & MSIE behave like Firefox.

Comment 2

6 years ago
Reproducible on the latest Nightly (20120703041519) on Windows too.

Laurent, can you please check if this issue reproduces for you on older builds too?
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM
Ever confirmed: true
OS: Linux → All
Product: Firefox → Core
QA Contact: untriaged → general
Hardware: x86 → All
(Reporter)

Comment 3

6 years ago
(In reply to Ioana Budnar [QA] from comment #2)
> Reproducible on the latest Nightly (20120703041519) on Windows too.
> 
> Laurent, can you please check if this issue reproduces for you on older
> builds too?

Older like what ?

Comment 4

6 years ago
(In reply to Laurent Martelli from comment #3)
> (In reply to Ioana Budnar [QA] from comment #2)
> > Reproducible on the latest Nightly (20120703041519) on Windows too.
> > 
> > Laurent, can you please check if this issue reproduces for you on older
> > builds too?
> 
> Older like what ?

Older like before Firefox 10 (9,8,7,6,5 or 4). Even better, if you can, please try to find a regression range for this bug http://harthur.github.com/mozregression/
(Reporter)

Comment 5

6 years ago
I've tried 3.6.28, 4.0.1 and 9.0.1: they all behave the same.
This is correct behavior per spec.  From the very last sentence at the very bottom of http://www.w3.org/TR/CSS21/visudet.html#line-height :

  The baseline of an 'inline-block' is the baseline of its last line box in the normal 
  flow, unless it has either no in-flow line boxes or if its 'overflow' property has a
  computed value other than 'visible', in which case the baseline is the bottom margin
  edge.

So changing the overflow value changes the baseline position.  Since both inline-blocks are baseline aligned, in this case that means that the bottom of the text in one block aligns with the bottom of the box in the other block, which is exactly what I see happen.

Ioana, for future reference if a testcase doesn't involve any script, it's not likely to be DOM.  ;)
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Component: DOM → Layout: Block and Inline
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.