mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +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),
|
||||
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,
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue