Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element hidden cause of backface visibility is considered visible #4271

Closed
DatrixCompany opened this issue May 21, 2019 · 1 comment
Closed
Labels
type: duplicate This issue or pull request already exists

Comments

@DatrixCompany
Copy link

DatrixCompany commented May 21, 2019

Current behavior:

Element with backface-visibility: hidden which is rotated by 180deg is still considered visible, and not hidden.

Desired behavior:

When the element is rotated (and hence not visible), the assertion el.should('be.hidden') should pass.

Steps to reproduce: (app code and test code)

  • Create a div that holds 2 inner divs with different text in each one
  • Add the property backface-visibility: hidden to both divs.
  • Add the property transform: rotateY(180deg) to the second div.
  • In the test, select the second inner div (the rotated one) and assert that it is hidden (el.should('be.hidden').

Versions

Cypress: 3.3.0
Windows 10
Chrome: 74.0.3729.157 64bit

Code example

HTML:

<div class="wrapper">
  <div class="innerDiv"><p>FRONT</p></div>
  <div class="innerDiv"><p>BACK</p></div>
</div>

CSS:

.wrapper {
  position: relative;
}

.innerDiv {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  backface-visibility: hidden;
}

.innerDiv.second {
  transform: translate(-50%, -50%) rotateY(180deg);
}

.wrapper:hover .innerDiv.first {
  transform: translate(-50%, -50%) rotateY(180deg);
}

.wrapper:hover .innerDiv.second {
  transform: translate(-50%, -50%) rotateY(0);
}
@jennifer-shehane
Copy link
Member

Duplicate of #2985

@jennifer-shehane jennifer-shehane marked this as a duplicate of #2985 May 24, 2019
@jennifer-shehane jennifer-shehane added the type: duplicate This issue or pull request already exists label May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants