diff --git a/components/gfx/color.rs b/components/gfx/color.rs index a91c6818ee6..f6fb0a7de3d 100644 --- a/components/gfx/color.rs +++ b/components/gfx/color.rs @@ -39,3 +39,8 @@ pub fn transparent_black() -> AzColor { pub fn white() -> AzColor { AzColor { r: 1.0, g: 1.0, b: 1.0, a: 1.0 } } + +#[inline] +pub fn transparent_white() -> AzColor { + AzColor { r: 1.0, g: 1.0, b: 1.0, a: 0.0 } +} diff --git a/components/layout/display_list_builder.rs b/components/layout/display_list_builder.rs index e92d0411216..7fcacac7713 100644 --- a/components/layout/display_list_builder.rs +++ b/components/layout/display_list_builder.rs @@ -1318,7 +1318,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow { ScrollPolicy::Scrollable }; - let transparent = color::rgba(1.0, 1.0, 1.0, 0.0); + let transparent = color::transparent_white(); let stacking_context = self.create_stacking_context(display_list, Some(Arc::new(PaintLayer::new(self.layer_id(0),