Skip to content

Commit a6e805b

Browse files
committed
Fix order issue
1 parent ada4af4 commit a6e805b

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

libs/sheet/src/lib.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,14 @@ impl StyleSheet {
134134
(true, false) => Greater,
135135
(false, true) => Less,
136136
(true, true) => match a.selector.cmp(&b.selector) {
137-
Equal => match a.value.cmp(&b.value) {
138-
Equal => a.class_name.cmp(&b.class_name),
137+
Equal => match a.property.cmp(&b.property) {
138+
Equal => a.value.cmp(&b.value),
139139
val => val,
140140
},
141141
val => val,
142142
},
143143
(false, false) => match a.property.cmp(&b.property) {
144-
Equal => match a.value.cmp(&b.value) {
145-
Equal => a.class_name.cmp(&b.class_name),
146-
val => val,
147-
},
144+
Equal => a.value.cmp(&b.value),
148145
prop => prop,
149146
},
150147
}

libs/sheet/src/snapshots/sheet__tests__theme_selector.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
source: libs/sheet/src/lib.rs
33
expression: sheet.create_css()
44
---
5-
":root[data-theme=dark] .test{margin-top:40px;margin-bottom:40px;}:root[data-theme=dark] .test{margin-left:40px;margin-right:40px;}:root[data-theme=light] .test{margin-left:50px;margin-right:50px;}"
5+
":root[data-theme=dark] .test{margin-left:40px;margin-right:40px;}:root[data-theme=dark] .test{margin-top:40px;margin-bottom:40px;}:root[data-theme=light] .test{margin-left:50px;margin-right:50px;}"

0 commit comments

Comments
 (0)