mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Use root element font size for rem calculation in Container queries
Differential Revision: https://phabricator.services.mozilla.com/D162853
This commit is contained in:
parent
4b9fc07522
commit
ea04827f05
2 changed files with 2 additions and 2 deletions
|
@ -218,7 +218,7 @@ impl<'a> Context<'a> {
|
||||||
builder: StyleBuilder::for_inheritance(device, None, None),
|
builder: StyleBuilder::for_inheritance(device, None, None),
|
||||||
cached_system_font: None,
|
cached_system_font: None,
|
||||||
in_media_query: true,
|
in_media_query: true,
|
||||||
in_container_query: true,
|
in_container_query: false,
|
||||||
quirks_mode,
|
quirks_mode,
|
||||||
for_smil_animation: false,
|
for_smil_animation: false,
|
||||||
container_info: None,
|
container_info: None,
|
||||||
|
|
|
@ -258,7 +258,7 @@ impl FontRelativeLength {
|
||||||
// element, the rem units refer to the property's initial
|
// element, the rem units refer to the property's initial
|
||||||
// value.
|
// 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
|
reference_font_size
|
||||||
} else {
|
} else {
|
||||||
context.device().root_font_size()
|
context.device().root_font_size()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue