needsStacking property

bool get needsStacking

Implementation

bool get needsStacking {
  return
    // Element with a position value absolute, relative, fixed or sticky.
    renderStyle.position != CSSPositionType.static ||
        // Element that is a child of a flex container with z-index value other than auto.
        ((renderStyle.parent!.display == CSSDisplay.flex || renderStyle.parent!.display == CSSDisplay.inlineFlex) &&
            renderStyle.zIndex != null) ||
        // Element with a opacity value less than 1.
        renderStyle.opacity < 1.0 ||
        // Element with a transform value.
        renderStyle.transform != null ||
        // Element with a filter value.
        renderStyle.filter != null;
}