mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibWeb: Create stacking context for flex/grid items with z-index != auto
This commit is contained in:
parent
fb5879fdcc
commit
f941b7aefe
Notes:
sideshowbarker
2024-07-17 07:11:12 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/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…
Reference in a new issue