Skip to content

inline-block element pushed down if a absolute+inline element is present #8602

Closed as not planned

Description

@paulrouget
<div style="background:#0F0; height: 100px; padding: 0px 30px; width: 100px;">
  <div style="display:inline; position:absolute"></div>
  <div style="display:inline-block; background: #F00; height:100%; width:100%;"></div>
</div>

screen shot 2015-11-19 at 14 48 53

Activity

  1. added
    I-wrong
    and removed on Nov 25, 2015
  2. pcwalton commented on Nov 25, 2015

    @pcwalton
    Contributor

    I wonder if the hypothetical box is taking up space.

  3. pcwalton commented on Nov 25, 2015

    @pcwalton
    Contributor
    ┌ Post layout flow tree
    │  ├─ Block(113c53590) pos=LogicalRect(H LTR, i800px×b608px, @ (i0px,b0px)), overflow=Rect(800px×608px at (0px,0px)) children=1 abs-descendents=1
    │  │  ├─ ↑↑ Fragment for block: SpecificFragmentInfo::Generic(10) [] border_box=LogicalRect(H LTR, i800px×b608px, @ (i0px,b0px)) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
    │  │  ├─ Block(113c53310) pos=LogicalRect(H LTR, i800px×b100px, @ (i0px,b8px)), overflow=Rect(784px×100px at (8px,0px)) children=1
    │  │  │  ├─ ↑↑ Fragment for block: SpecificFragmentInfo::Generic(8) [] border_box=LogicalRect(H LTR, i784px×b100px, @ (i8px,b0px)) margin=LogicalMargin(H LTR, i:8px..8px b:8px..8px) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
    │  │  │  ├─ Block(113c52b90) pos=LogicalRect(H LTR, i784px×b100px, @ (i8px,b0px)), overflow=Rect(160px×117.98333333333333px at (0px,0px)) children=1
    │  │  │  │  ├─ ↑↑ Fragment for block: SpecificFragmentInfo::Generic(4) [] border_box=LogicalRect(H LTR, i160px×b100px, @ (i0px,b0px)) border_padding=LogicalMargin(H LTR, i:30px..30px b:0px..0px) margin=LogicalMargin(H LTR, i:0px..624px b:0px..0px) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
    │  │  │  │  ├─ Inline(113c73010) pos=LogicalRect(H LTR, i100px×b117.96666666666667px, @ (i30px,b0px)), overflow=Rect(100px×117.98333333333333px at (0px,0px)) children=2 damage=RECONSTRUCT_FLOW
    │  │  │  │  │  ├─ SpecificFragmentInfo::InlineAbsoluteHypothetical(1) [] border_box=LogicalRect(H LTR, i0px×b0px, @ (i0px,b13.866666666666667px)) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
    │  │  │  │  │  ├─ SpecificFragmentInfo::ScannedText(6) [""] border_box=LogicalRect(H LTR, i0px×b15.983333333333333px, @ (i0px,b1px)) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
    │  │  │  │  │  ├─ SpecificFragmentInfo::InlineBlock(3) [] border_box=LogicalRect(H LTR, i100px×b100px, @ (i0px,b17.983333333333334px)) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
    │  │  │  │  │  ├─ Block(113c51f10) pos=LogicalRect(H LTR, i0px×b0px, @ (i0px,b13.866666666666667px)), overflow=Rect(0px×0px at (0px,0px))
    │  │  │  │  │  │  └─ ↑↑ Fragment for block: SpecificFragmentInfo::Generic(0) [] border_box=LogicalRect(H LTR, i0px×b0px, @ (i0px,b0px)) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
    │  │  │  │  │  ├─ Block(113c52690) pos=LogicalRect(H LTR, i100px×b100px, @ (i0px,b0px)), overflow=Rect(100px×100px at (0px,0px))
    │  │  │  │  │  │  └─ ↑↑ Fragment for block: SpecificFragmentInfo::Generic(2) [] border_box=LogicalRect(H LTR, i100px×b100px, @ (i0px,b0px)) damage=REPAINT | BUBBLE_ISIZES | REFLOW_OUT_OF_FLOW | REFLOW | RECONSTRUCT_FLOW
    
  4. mbrubeck commented on Nov 30, 2015

    @mbrubeck
    Contributor

    Interestingly, after forcing a reflow (e.g. by resizing the window), the test case is laid out correctly.

  5. mrobinson commented on Apr 15, 2025

    @mrobinson
    Member

    Looks good in modern layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-layout/blockA-layout/inlineI-wrong

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions