Active
Project:
Drupal core
Version:
main
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Apr 2026 at 15:27 UTC
Updated:
27 Apr 2026 at 15:27 UTC
Jump to comment: Most recent
Discovered via #3565258: Support library-specific aggregates.
Both starterkit and Claro specify the messages library to be always loaded via .info.yml, Olivero does not.
The messages library is added to the page when there are messages to render, either directly in PHP or via the AJAX messages command.
There is one additional case where messages can be set - directly via the js messages API, but in those cases the library that's doing that could add the messages library as a dependency.
This should reduce unused CSS. We can also set css_aggregate_target: true for the messages library once this is done, since it will often be the only different library that's loaded on a page.
Comments
Comment #2
catch