diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs index 1d40275db80..de5c1e5a374 100644 --- a/components/style/values/computed/mod.rs +++ b/components/style/values/computed/mod.rs @@ -218,7 +218,7 @@ impl<'a> Context<'a> { builder: StyleBuilder::for_inheritance(device, None, None), cached_system_font: None, in_media_query: true, - in_container_query: true, + in_container_query: false, quirks_mode, for_smil_animation: false, container_info: None, diff --git a/components/style/values/specified/length.rs b/components/style/values/specified/length.rs index 979a910509f..ea96ef7426e 100644 --- a/components/style/values/specified/length.rs +++ b/components/style/values/specified/length.rs @@ -258,7 +258,7 @@ impl FontRelativeLength { // element, the rem units refer to the property's initial // value. // - let reference_size = if context.builder.is_root_element || context.in_media_or_container_query() { + let reference_size = if context.builder.is_root_element || context.in_media_query { reference_font_size } else { context.device().root_font_size()