Skip to content

3D transform: using perspective makes element disappear #7797

Closed

Description

@paulrouget

Not sure what's the status of 3D transforms, but using perspective makes inner elements disappear.

<style>

  body {
    perspective: 1000px;
  }

  div {
    position: absolute;
    top: 25vh;
    left: 25vw;
    width: 50vw;
    height: 50vh;
    background-color: red;
  }

</style>

<div></div>

Activity

  1. paulrouget commented on Oct 19, 2015

    @paulrouget
    ContributorAuthor

    @glennw could you take a quick look at this?

  2. glennw commented on Oct 20, 2015

    @glennw
    Member

    OK, this seems to be unrelated to transforms - it appears to be a general layout bug.

    If I remove the perspective line from your test, and add opacity: 0.5 or mix-blend-mode: difference, those also make the element disappear.

    When a new stacking context is created in any of those situations, it gets a height of 0px for the stacking context bounding rectangle, which will be the cause of it not displaying. Looking further into into now...

  3. glennw commented on Oct 20, 2015

    @glennw
    Member

    Any ideas @pcwalton ?

  4. pcwalton commented on Oct 20, 2015

    @pcwalton
    Contributor

    Not sure off the top of my head. I don't recall explicitly setting zero height for any of those situations in layout.

  5. metajack commented on Nov 2, 2015

    @metajack
    Collaborator

    @glennw Could you spare some time to look into this? This is blocking browser.html progress.

  6. glennw commented on Nov 2, 2015

    @glennw
    Member

    @metajack Sure, I'll look into this one today.

  7. self-assigned this
    on Nov 2, 2015
  8. added 3 commits that reference this issue on Nov 3, 2015
    74913a6
    d7f078c
    695b749
  9. added a commit that references this issue on Nov 4, 2015
    ca56ebb
  10. added a commit that references this issue on Mar 17, 2016
    ca3972a
  11. added a commit that references this issue on Mar 17, 2016
    0d02c45
  12. added a commit that references this issue on Mar 19, 2016
    5ea8c34
  13. added 2 commits that reference this issue on Mar 19, 2016
    b7a53b5
    8120fb5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions