diff --git a/core/includes/theme.inc b/core/includes/theme.inc index dfee854..656fc9c 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1467,21 +1467,20 @@ function theme_get_suggestions($args, $base, $delimiter = '__') { * An associative array containing: * - content - An array of page content. * * @see system_page_attachments() */ function template_preprocess_maintenance_page(&$variables) { // @todo Rename the templates to page--maintenance + page--install. template_preprocess_page($variables); // @see system_page_attachments() - $variables['#attached']['library'][] = 'core/normalize'; $variables['#attached']['library'][] = 'system/maintenance'; } /** * Prepares variables for install page templates. * * Default template: install-page.html.twig. * * @param array $variables * An associative array containing: diff --git a/core/modules/system/src/Tests/Theme/ThemeInfoTest.php b/core/modules/system/src/Tests/Theme/ThemeInfoTest.php index aeb8846..ba191da 100644 --- a/core/modules/system/src/Tests/Theme/ThemeInfoTest.php +++ b/core/modules/system/src/Tests/Theme/ThemeInfoTest.php @@ -92,20 +92,20 @@ function testStylesheets() { * Tests that changes to the info file are picked up. */ public function testChanges() { $this->themeHandler->install(array('test_theme')); $this->themeHandler->setDefault('test_theme'); $this->themeManager->resetActiveTheme(); $active_theme = $this->themeManager->getActiveTheme(); // Make sure we are not testing the wrong theme. $this->assertEqual('test_theme', $active_theme->getName()); - $this->assertEqual(['classy/base'], $active_theme->getLibraries()); + $this->assertEqual(['classy/base', 'core/normalize'], $active_theme->getLibraries()); // @see theme_test_system_info_alter() $this->state->set('theme_test.modify_info_files', TRUE); drupal_flush_all_caches(); $active_theme = $this->themeManager->getActiveTheme(); - $this->assertEqual(['classy/base', 'core/backbone'], $active_theme->getLibraries()); + $this->assertEqual(['classy/base', 'core/normalize', 'core/backbone'], $active_theme->getLibraries()); } } diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 88f9023..c8a8be5 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -514,21 +514,20 @@ function system_filetransfer_info() { } /** * Implements hook_page_attachments(). * * @see template_preprocess_maintenance_page() * @see \Drupal\system\Controller\SystemController::setLinkActiveClass() */ function system_page_attachments(array &$page) { // Ensure the same CSS is loaded in template_preprocess_maintenance_page(). - $page['#attached']['library'][] = 'core/normalize'; $page['#attached']['library'][] = 'system/base'; if (\Drupal::service('router.admin_context')->isAdminRoute()) { $page['#attached']['library'][] = 'system/admin'; } // Attach libraries used by this theme. $active_theme = \Drupal::theme()->getActiveTheme(); foreach ($active_theme->getLibraries() as $library) { $page['#attached']['library'][] = $library; } diff --git a/core/themes/classy/classy.info.yml b/core/themes/classy/classy.info.yml index 93a5268..bd61ce0 100644 --- a/core/themes/classy/classy.info.yml +++ b/core/themes/classy/classy.info.yml @@ -1,9 +1,10 @@ name: Classy type: theme description: 'A base theme with sensible default CSS classes added. Learn how to use Classy as a base theme in the Drupal 8 Theming Guide.' package: Core version: VERSION core: 8.x libraries: - classy/base + - core/normalize