Closed apalm closed 8 years ago
@apalm Awesome catch! Definitely a regression, and partially related to the new de-deduping - the cause is actually a tiny bit more complex, but interesting, so I'll write it out (for fun).
So when a style is added to the cache, it's stored in an object. Object keys are ordered based on addition time (E.g. the first key added is before the second key). So the issue here is that it's correctly deduped, but the key order isn't updated - this results in output style being in the wrong order whenever there's a deduped style like this.
I'll release a patch ASAP, but thanks for the catch :+1:
Released with 1.0.2
- http://requirebin.com/?gist=f6ea45caf71dd78caa15
Wow, that was quick :thumbsup:
Thanks for the explanation and patch.
v0.5.6: http://requirebin.com/?gist=cb4df599fb69934baea9
v1.0.1: http://requirebin.com/?gist=ff31e7c6c16f720fbae2
Hopefully, the requirebins make it clear enough, but in the latter version, class
y
within the media query is overridden by the later classy
, so the div's background is always palegreen. I'm guessing this is related to the de-duping of@-rules
introduced in v1.