Skip to content

CSS load order incorrect using default_head_blocks.xml #1821

@chicgeek

Description

@chicgeek

For my theme I am loading in two stylesheets: one from a CDN (cdn.css) and one from my theme (local.css). They should be loaded in this order in the DOM but it does not preserve the order indicated by the XML.

This is what I have in default_head_blocks.xml in the correct order:

<css src="https://example.com/cdn.css" src_type="url" />
<css src="css/local.css" />

But in the DOM it does not load in this order: local.css is loaded in first and cdn.css second.

I believe this to be a bug - am I missing additional configuration to set load order for these assets?

I did not find information specific to load order in the documentation. I know in M1 the order specified in the XML would be preserved in the DOM.

Metadata

Metadata

Assignees

Labels

Area: FrontendEvent: distributed-cdDistributed Contribution DayFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions