Caution:
This post was published in 2017 and may contain information, techniques or code examples that are no longer current. Please double-check official documentation and modern best practices before using anything from this article.
This post was published in 2017 and may contain information, techniques or code examples that are no longer current. Please double-check official documentation and modern best practices before using anything from this article.
This one will come in useful until Magento 2 sorts itself out.
For some reason, Magento 2 has no way to order assets out of the box. There is now an extension which allows you to set an order attribute in the CSS tags of the layout XML files and layout updates in Admin Panel.
Github: Mage2 Ordered Assets by Quickshiftin
Example
Before
<head> <css src="css/app.css" /> </head>
After
<head> <css src="css/app.css" order="100" /> </head>