Skip to content

Absolutely positioned elements should only be stacking contexts if z-index is not auto #7069

Closed

Description

@paulrouget
<!DOCTYPE html>

<html>
  <body>
      <div style="background: red;   position: absolute; height: 40px; width: 40px; top: 10px; left: 10px;"></div>
      <div style="background: green; position: relative; height: 40px; width: 40px; top: 20px; left: 20px;"></div>
  </body>
</html>

Difference between Gecko and Servo:

screen shot 2015-08-07 at 12 52 28

Activity

  1. added
    I-wrong
    on Aug 7, 2015
  2. pcwalton commented on Aug 8, 2015

    @pcwalton
    Contributor

    Yeah, this is because we unconditionally make stacking contexts out of absolutely positioned elements.

  3. changed the title [-]position:relative elements are drawn below position:absolute elements[/-] [+]Absolutely positioned elements should only be stacking contexts if z-index is not auto[/+] on Aug 8, 2015
  4. pcwalton commented on Aug 10, 2015

    @pcwalton
    Contributor

    I have a fix for this that I'm testing now.

  5. added 2 commits that reference this issue on Aug 10, 2015
    251cf09
    3812a22
  6. added a commit that references this issue on Aug 10, 2015
    2050f61
  7. added a commit that references this issue on Aug 11, 2015
    d3d59ce
  8. added a commit that references this issue on Aug 11, 2015
    7ce4726
  9. added a commit that references this issue on Aug 14, 2015
    7c274f7
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/blockI-wrong

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions