Function style::values::animated::compare_property_priority

source ยท
pub fn compare_property_priority(a: &PropertyId, b: &PropertyId) -> Ordering
Expand description

A comparator to sort PropertyIds such that physical longhands are sorted before logical longhands and shorthands, shorthands with fewer components are sorted before shorthands with more components, and otherwise shorthands are sorted by IDL name as defined by [Web Animations][property-order].

Using this allows us to prioritize values specified by longhands (or smaller shorthand subsets) when longhands and shorthands are both specified on the one keyframe.

[property-order] https://drafts.csswg.org/web-animations/#calculating-computed-keyframes