Does the mask always block the corresponding element when after before sets the mask effect?

@import "../../vari";

.up-mask {
  z-index: 100; //less then ui:z-index:1104
  //&:after {
  //  content: "";
  //  position: fixed;
  //  z-index: 99;
  //  background-color: @default-mask-color;
  //  top: 0;
  //  right: 0;
  //  bottom: 0;
  //  left: 0;
  //}
  // after & before 
  & + .mask {
    content: "";
    position: fixed;
    z-index: 99;
    background-color: @default-mask-color;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }
}

after & before feels that it still corresponds to the inlay dom; of dom, which makes it impossible to set a z-index lower than itself. Maybe I wrote it wrong?

Mar.20,2021

z-index only works on positioning elements (for example, position:relative/absolute;)!


z-index:-1 try

Menu