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.
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.