1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:37:45 +00:00

LibWeb: Draw elements with opacity in a separate stacking context

This commit is contained in:
Egor Ananyin 2021-07-23 13:19:16 +03:00 committed by Ali Mohammad Pur
parent 0e6ba6e1d3
commit f567414f65
3 changed files with 27 additions and 1 deletions

View file

@ -77,6 +77,9 @@ bool Node::establishes_stacking_context() const
auto position = computed_values().position();
if (position == CSS::Position::Absolute || position == CSS::Position::Relative || position == CSS::Position::Fixed || position == CSS::Position::Sticky)
return true;
auto opacity = computed_values().opacity();
if (opacity.has_value() && opacity.value() != 1.0f)
return true;
return false;
}