Skip to content

Commit 2f5e3d2

Browse files
committed
vaev-style: Fix evaluation order for important declarations.
1 parent c8d42f6 commit 2f5e3d2

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/vaev-style/computer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Rc<SpecifiedValues> Computer::_evalCascade(SpecifiedValues const& parent, Matchi
9292
}
9393
}
9494

95-
for (auto const& prop : iterRev(importantProps))
95+
for (auto const& prop : importantProps)
9696
prop->apply(parent, *computed);
9797

9898
return computed;

tests/css/selectors/descendant.xhtml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,20 @@
8181
}
8282
</style>
8383
</rendering>
84+
85+
<rendering>
86+
<div class="o_content">
87+
<div class="o_flex o_flex2" />
88+
</div>
89+
90+
<style>
91+
.o_flex {
92+
background-color: red !important;
93+
}
94+
.o_content > .o_flex.o_flex2 {
95+
background-color: green !important;
96+
}
97+
98+
</style>
99+
</rendering>
84100
</test>

0 commit comments

Comments
 (0)