diff --git a/components/style/custom_properties.rs b/components/style/custom_properties.rs index 4943fd1a74a..4a0bf5bed7a 100644 --- a/components/style/custom_properties.rs +++ b/components/style/custom_properties.rs @@ -662,6 +662,7 @@ impl<'a> CustomPropertiesBuilder<'a> { let inherited = self.inherited.as_ref().map(|m| &***m); substitute_all(&mut map, inherited, self.device); } + map.shrink_to_fit(); Some(Arc::new(map)) } }