mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
LibWeb: Create stacking context for flex/grid items with z-index != auto
This commit is contained in:
parent
fb5879fdcc
commit
f941b7aefe
1 changed files with 9 additions and 0 deletions
|
@ -89,6 +89,15 @@ bool Node::establishes_stacking_context() const
|
|||
return true;
|
||||
if (!computed_values().transformations().is_empty())
|
||||
return true;
|
||||
|
||||
// Element that is a child of a flex container, with z-index value other than auto.
|
||||
if (parent() && parent()->computed_values().display().is_flex_inside() && computed_values().z_index().has_value())
|
||||
return true;
|
||||
|
||||
// Element that is a child of a grid container, with z-index value other than auto.
|
||||
if (parent() && parent()->computed_values().display().is_grid_inside() && computed_values().z_index().has_value())
|
||||
return true;
|
||||
|
||||
return computed_values().opacity() < 1.0f;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue