Here's the working example, that reproduces the problem.
I have an overlay div, which is a sibling with the transformed div. I want transformed div's child stacked over the overlay div. 
Here is some code snippets:
.overlay {
  position:fixed;
  height:100%;
  width:100%;
  background: rgba(0, 0, 0, .5);
  z-index: 2;
  top: 0;
  left: 0;
}
// transformed div
.parent {
  width: 200px;
  height: 200px;
  border: 3px solid violet;
  transform: translate(20px, 50px);
  display: flex;
  position: relative;
}
.child {
  margin: auto;
  width: 50px;
  height: 50px;
  background: yellow;
  z-index: 10; // doesn't work
  position: relative;
}
How can I achieve that?
 
    