Skip to content

Commit

Permalink
Make emtpy rule can be inserted into rule tree
Browse files Browse the repository at this point in the history
  • Loading branch information
kuoe0 committed Aug 16, 2017
1 parent f93c6df commit a6ceafe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/style/rule_tree/mod.rs
Expand Up @@ -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
Expand Down

0 comments on commit a6ceafe

Please sign in to comment.