diff -u b/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php b/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php --- b/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php +++ b/core/lib/Drupal/Core/Asset/CssCollectionRenderer.php @@ -72,9 +72,8 @@ throw new \Exception('Invalid CSS asset type.'); } - // Attributes may only be set if the stylesheet is outputted - // independently. - if (!empty($element['#attributes']['href']) && !empty($css_asset['attributes'])) { + // Merge any additional attributes. + if (!empty($css_asset['attributes'])) { $element['#attributes'] += $css_asset['attributes']; }