aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/fragment.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/fragment.rs')
-rw-r--r--components/layout/fragment.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs
index 4e0763612ad..8cd37f314ed 100644
--- a/components/layout/fragment.rs
+++ b/components/layout/fragment.rs
@@ -2521,8 +2521,9 @@ impl Fragment {
return true
}
- // Fixed position blocks always create stacking contexts.
- if self.style.get_box().position == position::T::fixed {
+ // Fixed position and sticky position always create stacking contexts.
+ if self.style().get_box().position == position::T::fixed ||
+ self.style().get_box().position == position::T::sticky {
return true
}