Where is the block with CSS and JS in the
<head></head> rendered? And how to change the order of the elements from that section?
(this screenshot is from Magento 2 demo)
I'd like to change the order of elements in that section (and add more elements at the end) but I couldn't find any template file responsible for that part of the head, so it seems like it's rendered somewhere else.
A few elements from the head (e.g. the
viewport meta tag) are added in this layout file
<head> <meta name="viewport" content="width=device-width, initial-scale=1"/> <css src="mage/calendar.css"/> <script src="requirejs/require.js"/> </head>
A few other elements are added in this layout file
<head> <css src="css/styles-m.css"/> <css src="css/styles-l.css" media="screen and (min-width: 768px)"/> <css src="css/print.css" media="print"/> </head>
But what decides that in the end on the frontend the
requirejs/require.jsis placed after
css/styles-l.css? Where is the code responsible for that?
Where is this element added to the head?
<link rel="stylesheet" type="text/css" media="all" href="http://magento2-demo.nexcess.net/pub/media/styles.css" />
I know it is taken from the Scripts and Style Sheets field from the admin panel: Content -> Design -> Configuration -> HTML Head. But what decides that it is displayed right after
requirejs/require.js and not after other CSS assets like