cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.07k stars 399 forks source link

Wrong styles order by DomRenderer #752

Closed anechunaev closed 6 years ago

anechunaev commented 6 years ago

This bug was found and described here: https://github.com/cssinjs/react-jss/issues/278

Demo project: https://github.com/bungu/jss-wrong-style-order-example

If you define custom insertion point as DOM element (typeof element.nodeType === 'number') and insertion point is the last child of <head>, then sheets with same highest index (except first) will be rendered at insertion point, instead of first highest sheet.

I'm not sure how to write test for this bug properly, so I made simple demo project.

HenriBeck commented 6 years ago

Fixed by #819