diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs index ff511a2a5832..1b1062d255a2 100644 --- a/components/style/rule_tree/mod.rs +++ b/components/style/rule_tree/mod.rs @@ -210,7 +210,10 @@ impl RuleTree { _ => {}, }; } - if any_normal { + // We really want to ensure empty rule nodes appear in the rule tree for + // devtools, this condition ensures that if we find an empty rule node, we + // insert it at the normal level. + if any_normal || !any_important { if matches!(level, Transitions) && found_important { // There can be at most one transition, and it will come at // the end of the iterator. Stash it and apply it after