Since the weight logics have all been removed it is currently impossible to order html_head assets. There are situations where it is required to have a proper order of two attached html_head's or add inline CSS/JS with dependencies.

Examples:

  • Inline CSS for mobile first sites that needs overridden by a module.
  • JS code that need to be added in proper order to allow overrides.

This goes back to performance presentation https://docs.google.com/presentation/d/1Q44eWLI2qvZnmCF5oD2jCw-FFql9dYg3... that recommends to add inline CSS on mobile first sites. Since Drupal 8 is made for mobile first we need to cover and support inline code.

Comments

hass’s picture

Issue summary: View changes
catch’s picture

Status: Active » Closed (duplicate)

This looks like a duplicate of #2391025: Add support for inline JS/CSS with #attached - whatever happens there should resolve the issues you have here.