Verified Commit 73613e52 authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3374901 by e0ipso, mglaman, mherchel, _utsavsharma, gareth.poole,...

Issue #3374901 by e0ipso, mglaman, mherchel, _utsavsharma, gareth.poole, catch, eelkeblok, lauriii, web-beest: SDC stylesheets should be added in the "theme" aggregate group (as opposed to "default" group) to correct CSS source order
parent fc8a2834
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -227,7 +227,10 @@ 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.
            // @see \Drupal\Core\Plugin\Component::getLibraryName
            $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'])) {
+1 −0
Original line number Diff line number Diff line
@@ -513,6 +513,7 @@ tablesorts
tabset
tabwidth
tbachert
tenderwolf
testbot
testlogger
textareas
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ public function testLogin(): void {
      'CacheTagLookupQueryCount' => 20,
      'ScriptCount' => 3,
      'ScriptBytes' => 215500,
      'StylesheetCount' => 1,
      'StylesheetCount' => 2,
      'StylesheetBytes' => 46000,
    ];
    $this->assertMetrics($expected, $performance_data);
+10 −0
Original line number Diff line number Diff line
$schema: https://git.drupalcode.org/project/sdc/-/raw/1.x/src/metadata.schema.json
name: CSS Load Order
props:
  type: object
  properties:
    dummy:
      type: string
libraryOverrides:
  dependencies:
    - sdc_theme_test/css_load_order_dependent
+3 −0
Original line number Diff line number Diff line
div {
  display: block;
}
Loading