Skip to content
Snippets Groups Projects
Commit 0df00704 authored by Matt Glaman's avatar Matt Glaman
Browse files

do not expose a new UI and check on library id

parent 6d95526d
No related branches found
No related tags found
1 merge request!11633Dependent stylesheets are output in the wrong order
......@@ -222,7 +222,6 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize, ?Langua
$definition = $this->libraryDiscovery->getLibraryByName($extension, $name);
foreach ($definition['css'] as $options) {
$options += $default_options;
// Copy the asset library license information to each file.
$options['license'] = $definition['license'];
......
......@@ -227,7 +227,9 @@ public function buildByExtension($extension) {
$options['group'] = JS_LIBRARY;
}
elseif ($type == 'css') {
$options['group'] ??= $extension_type == 'theme' ? CSS_AGGREGATE_THEME : CSS_AGGREGATE_DEFAULT;
// Component stylesheets should be added in the "theme" aggregate
// group to load them alongside the theme.
$options['group'] = ($extension_type == 'theme' || str_starts_with($id, 'components.')) ? CSS_AGGREGATE_THEME : CSS_AGGREGATE_DEFAULT;
}
// By default, all library assets are files.
if (!isset($options['type'])) {
......
......@@ -187,10 +187,7 @@ protected function libraryFromDefinition(array $definition): array {
TRUE
);
if ($css_file) {
$library['css']['component'][$css_file] = [
// Without casting to a string, Twig rendering breaks due to integer.
'group' => (string) CSS_AGGREGATE_THEME,
];
$library['css']['component'][$css_file] = [];
}
$js_file = $this->findAsset(
$component_directory,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment