diff --git a/core/modules/block/tests/modules/block_test/config/install/block.block.test_block.yml b/core/modules/block/tests/modules/block_test/config/install/block.block.test_block.yml index be7e06ce0efe2400b3b90be685d39f3b67659a54..f52790fcc7d006cb2beadb23ff2348f73fe4ebc1 100644 --- a/core/modules/block/tests/modules/block_test/config/install/block.block.test_block.yml +++ b/core/modules/block/tests/modules/block_test/config/install/block.block.test_block.yml @@ -13,5 +13,5 @@ dependencies: module: - block_test theme: - - classy + - stark visibility: { } diff --git a/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php b/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php index 26334eecc4a1ca6e232b601f26b2f4411d965d15..a3d3e41a5a8b17982931c0f5c25fe73a6470163e 100644 --- a/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php +++ b/core/modules/ckeditor/tests/src/Kernel/CKEditorTest.php @@ -276,7 +276,6 @@ public function testBuildContentsCssJSSetting() { // Enable the Bartik theme, which specifies a CKEditor stylesheet. \Drupal::service('theme_installer')->install(['bartik']); $this->config('system.theme')->set('default', 'bartik')->save(); - $expected[] = file_url_transform_relative(file_create_url('core/themes/classy/css/components/media-embed-error.css')) . $query_string; $expected[] = file_url_transform_relative(file_create_url('core/themes/bartik/css/base/elements.css')) . $query_string; $expected[] = file_url_transform_relative(file_create_url('core/themes/bartik/css/components/captions.css')) . $query_string; $expected[] = file_url_transform_relative(file_create_url('core/themes/bartik/css/components/table.css')) . $query_string; diff --git a/core/modules/config/tests/src/Functional/ConfigImportUITest.php b/core/modules/config/tests/src/Functional/ConfigImportUITest.php index 2f6994cce4d077a974f66daf312b66068d1fec7b..3dd18fca36ba408d7da660b11901762412e676be 100644 --- a/core/modules/config/tests/src/Functional/ConfigImportUITest.php +++ b/core/modules/config/tests/src/Functional/ConfigImportUITest.php @@ -84,8 +84,8 @@ public function testImport() { $core_extension['module']['automated_cron'] = 0; $core_extension['module']['ban'] = 0; $core_extension['module'] = module_config_sort($core_extension['module']); - // Bartik is a subtheme of classy so classy must be enabled. - $core_extension['theme']['classy'] = 0; + // Bartik is a subtheme of Stable so Stable must be enabled. + $core_extension['theme']['stable'] = 0; $core_extension['theme']['bartik'] = 0; $sync->write('core.extension', $core_extension); @@ -503,10 +503,10 @@ public function testExtensionValidation() { unset($core['module']['text']); $module_data = $this->container->get('extension.list.module')->getList(); $this->assertTrue(isset($module_data['node']->requires['text']), 'The Node module depends on the Text module.'); - // Bartik depends on classy. - unset($core['theme']['classy']); + // Bartik depends on Stable. + unset($core['theme']['stable']); $theme_data = \Drupal::service('theme_handler')->rebuildThemeData(); - $this->assertTrue(isset($theme_data['bartik']->requires['classy']), 'The Bartik theme depends on the Classy theme.'); + $this->assertTrue(isset($theme_data['bartik']->requires['stable']), 'The Bartik theme depends on the Stable theme.'); // This module does not exist. $core['module']['does_not_exist'] = 0; // This theme does not exist. @@ -516,7 +516,7 @@ public function testExtensionValidation() { $this->drupalPostForm('admin/config/development/configuration', [], t('Import all')); $this->assertText('The configuration cannot be imported because it failed validation for the following reasons:'); $this->assertText('Unable to uninstall the Text module since the Node module is installed.'); - $this->assertText('Unable to uninstall the Classy theme since the Bartik theme is installed.'); + $this->assertText('Unable to uninstall the Stable theme since the Bartik theme is installed.'); $this->assertText('Unable to install the does_not_exist module since it does not exist.'); $this->assertText('Unable to install the does_not_exist theme since it does not exist.'); } diff --git a/core/modules/system/system.post_update.php b/core/modules/system/system.post_update.php index 8e6adc397dc964b134a06c2e8fe7bbc067478599..04303293caa5afc38d14f26272d70fc4ca806cb0 100644 --- a/core/modules/system/system.post_update.php +++ b/core/modules/system/system.post_update.php @@ -13,6 +13,7 @@ use Drupal\Core\Entity\Entity\EntityFormDisplay; use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Extension\Exception\UnknownExtensionException; use Drupal\Core\Field\Plugin\Field\FieldWidget\EntityReferenceAutocompleteWidget; /** @@ -316,3 +317,18 @@ function system_post_update_entity_revision_metadata_bc_cleanup() { $last_installed_schema_repository->setLastInstalledDefinition($entity_type); } } + +/** + * Uninstall Classy if it is no longer needed. + */ +function system_post_update_uninstall_classy() { + /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */ + $theme_installer = \Drupal::getContainer()->get('theme_installer'); + try { + $theme_installer->uninstall(['classy']); + } + catch (\InvalidArgumentException | UnknownExtensionException $exception) { + // Exception is thrown if Classy wasn't installed or if there are themes + // depending on it. + } +} diff --git a/core/modules/system/tests/src/Functional/Update/ClassyUninstallUpdateTest.php b/core/modules/system/tests/src/Functional/Update/ClassyUninstallUpdateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..81be40b8b627cd69b6a63b77fd5b83ee7183cef1 --- /dev/null +++ b/core/modules/system/tests/src/Functional/Update/ClassyUninstallUpdateTest.php @@ -0,0 +1,88 @@ +<?php + +namespace Drupal\Tests\system\Functional\Update; + +use Drupal\FunctionalTests\Update\UpdatePathTestBase; + +/** + * Ensures that update hook uninstalls Classy when it's no longer needed. + * + * @group Update + * @see system_post_update_uninstall_classy() + */ +class ClassyUninstallUpdateTest extends UpdatePathTestBase { + + /** + * {@inheritdoc} + */ + protected function setDatabaseDumpFiles() { + $this->databaseDumpFiles = [ + __DIR__ . '/../../../fixtures/update/drupal-8.8.0.bare.standard.php.gz', + ]; + } + + /** + * Ensures that Classy is disabled if it's no longer needed. + */ + public function testUpdate() { + /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */ + $theme_handler = $this->container->get('theme_handler'); + $this->assertTrue($theme_handler->themeExists('classy')); + + $this->runUpdates(); + + // Ensure that Classy is not installed after running updates. + $theme_handler->refreshInfo(); + $this->assertFalse($theme_handler->themeExists('classy')); + $this->assertTrue($theme_handler->themeExists('stable')); + } + + /** + * Ensures that updates run without errors when Classy is not installed. + */ + public function testUpdateClassyNotInstalled() { + /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */ + $theme_handler = $this->container->get('theme_handler'); + $theme_list = array_keys($theme_handler->listInfo()); + /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */ + $theme_installer = $this->container->get('theme_installer'); + $theme_installer->install(['stark']); + $this->container->get('config.factory') + ->getEditable('system.theme') + ->set('default', 'stark') + ->set('admin', '') + ->save(); + $theme_handler->refreshInfo(); + + // Uninstall all themes that were installed prior to enabling Stark. + $theme_installer->uninstall($theme_list); + + // Ensure that Classy is not installed anymore. + $theme_handler->refreshInfo(); + $this->assertFalse($theme_handler->themeExists('classy')); + + $this->runUpdates(); + + $theme_handler->refreshInfo(); + $this->assertFalse($theme_handler->themeExists('classy')); + } + + /** + * Ensures that updates run without errors when Classy is still needed. + */ + public function testUpdateClassyNeeded() { + /** @var \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler */ + $theme_handler = $this->container->get('theme_handler'); + /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */ + $theme_installer = $this->container->get('theme_installer'); + $theme_installer->install(['test_theme']); + $this->assertTrue($theme_handler->themeExists('classy')); + + $this->runUpdates(); + + // Ensure that Classy is still installed after running tests. + $theme_handler->refreshInfo(); + $this->assertTrue($theme_handler->themeExists('classy')); + } + +} diff --git a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php index 503b1c50b781d8114fde3ecfb415aac266d6a95b..db7aa38021ea2680a7760526510ccf3bd546208d 100644 --- a/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php +++ b/core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php @@ -409,7 +409,6 @@ public function testUpdatedSite() { // Make sure our themes are still enabled. $expected_enabled_themes = [ 'bartik', - 'classy', 'seven', 'stark', ]; diff --git a/core/profiles/demo_umami/themes/umami/css/classy/components/image-widget.css b/core/profiles/demo_umami/themes/umami/css/classy/components/image-widget.css deleted file mode 100644 index 56777c41ea43d0fdd279c1ce5f1f024b949a3e58..0000000000000000000000000000000000000000 --- a/core/profiles/demo_umami/themes/umami/css/classy/components/image-widget.css +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file - * Image upload widget. - * - * This CSS file is not used in this theme (Classy). It was intended to be used, - * but due to a bug, Drupal 8 shipped with it not being used. To not break - * backwards compatibility, we continue to not load it in Classy. Every - * subtheme of Classy is encouraged to use it, by attaching the - * classy/image-widget asset library in their image-widget.html.twig file. - * - * @see core/themes/seven/templates/content-edit/image-widget.html.twig. - * - * @todo In Drupal 9, let core/themes/classy/templates/content-edit/image-widget.html.twig - * attach the classy/image-widget asset library. - */ - -.image-preview { - float: left; /* LTR */ - padding: 0 10px 10px 0; /* LTR */ -} -[dir="rtl"] .image-preview { - float: right; - padding: 0 0 10px 10px; -} -.image-widget-data { - float: left; /* LTR */ -} -[dir="rtl"] .image-widget-data { - float: right; -} -.image-widget-data .text-field { - width: auto; -} diff --git a/core/profiles/demo_umami/themes/umami/umami.info.yml b/core/profiles/demo_umami/themes/umami/umami.info.yml index 8d020bddd2571f4fc9716d6f32db2d50806ec9eb..806c13569868dc16291f6f59cc49e676dc5d0ee4 100644 --- a/core/profiles/demo_umami/themes/umami/umami.info.yml +++ b/core/profiles/demo_umami/themes/umami/umami.info.yml @@ -1,31 +1,17 @@ name: Umami type: theme -base theme: classy +base theme: stable description: 'The theme used for the Umami food magazine demonstration site.' version: VERSION libraries: + - umami/classy.base + - core/normalize - umami/global - umami/messages - umami/webfonts-open-sans - umami/webfonts-scope-one libraries-override: - classy/base: umami/classy.base - classy/book-navigation: umami/classy.book-navigation - classy/dialog: umami/classy.dialog - classy/dropbutton: umami/classy.dropbutton - classy/file: umami/classy.file - classy/forum: umami/classy.forum - classy/image-widget: umami/classy.image-widget - classy/indented: umami/classy.indented - classy/media_embed_ckeditor_theme: umami/classy.media_embed_ckeditor_theme - classy/media_embed_error: umami/classy.media_embed_error - classy/media_library: umami/classy.media_library - classy/messages: false - classy/node: umami/classy.node - classy/progress: umami/classy.progress - classy/search-results: umami/classy.search-results - classy/user: umami/classy.user layout_builder/twocol_section: css: theme: diff --git a/core/profiles/demo_umami/themes/umami/umami.libraries.yml b/core/profiles/demo_umami/themes/umami/umami.libraries.yml index ccb8e3b18dae6a96e51d0ca65b78abb43c91d488..da306c39865279acaec97571383fc41fd02dda43 100644 --- a/core/profiles/demo_umami/themes/umami/umami.libraries.yml +++ b/core/profiles/demo_umami/themes/umami/umami.libraries.yml @@ -189,12 +189,6 @@ classy.forum: component: css/classy/components/forum.css: { weight: -10 } -classy.image-widget: - version: VERSION - css: - component: - css/classy/components/image-widget.css: {} - classy.indented: version: VERSION css: diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php index 7d6d69be9086588737a33dba97ea6b4b0a5cbf66..db38a87af501993f3b80658d064eece5c937d3f4 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php @@ -597,7 +597,6 @@ public function testUnmetDependency() { 'Unable to install the <em class="placeholder">unknown_module</em> module since it does not exist.', 'Unable to install the <em class="placeholder">Book</em> module since it requires the <em class="placeholder">Node, Text, Field, Filter, User</em> modules.', 'Unable to install the <em class="placeholder">unknown_theme</em> theme since it does not exist.', - 'Unable to install the <em class="placeholder">Bartik</em> theme since it requires the <em class="placeholder">Classy</em> theme.', 'Unable to install the <em class="placeholder">Bartik</em> theme since it requires the <em class="placeholder">Stable</em> theme.', 'Configuration <em class="placeholder">config_test.dynamic.dotted.config</em> depends on the <em class="placeholder">unknown</em> configuration that will not exist after import.', 'Configuration <em class="placeholder">config_test.dynamic.dotted.existing</em> depends on the <em class="placeholder">config_test.dynamic.dotted.deleted</em> configuration that will not exist after import.', @@ -611,7 +610,6 @@ public function testUnmetDependency() { 'Unable to install the <em class="placeholder">unknown_module</em> module since it does not exist.', 'Unable to install the <em class="placeholder">Book</em> module since it requires the <em class="placeholder">Node, Text, Field, Filter, User</em> modules.', 'Unable to install the <em class="placeholder">unknown_theme</em> theme since it does not exist.', - 'Unable to install the <em class="placeholder">Bartik</em> theme since it requires the <em class="placeholder">Classy</em> theme.', 'Configuration <em class="placeholder">config_test.dynamic.dotted.config</em> depends on the <em class="placeholder">unknown</em> configuration that will not exist after import.', 'Configuration <em class="placeholder">config_test.dynamic.dotted.existing</em> depends on the <em class="placeholder">config_test.dynamic.dotted.deleted</em> configuration that will not exist after import.', 'Configuration <em class="placeholder">config_test.dynamic.dotted.module</em> depends on the <em class="placeholder">unknown</em> module that will not be installed after import.', @@ -641,7 +639,6 @@ public function testUnmetDependency() { 'Unable to install the <em class="placeholder">unknown_module</em> module since it does not exist.', 'Unable to install the <em class="placeholder">Book</em> module since it requires the <em class="placeholder">Node, Text, Field, Filter, User</em> modules.', 'Unable to install the <em class="placeholder">unknown_theme</em> theme since it does not exist.', - 'Unable to install the <em class="placeholder">Bartik</em> theme since it requires the <em class="placeholder">Classy</em> theme.', 'Unable to install the <em class="placeholder">Bartik</em> theme since it requires the <em class="placeholder">Stable</em> theme.', 'Configuration <em class="placeholder">config_test.dynamic.dotted.config</em> depends on the <em class="placeholder">unknown</em> configuration that will not exist after import.', 'Configuration <em class="placeholder">config_test.dynamic.dotted.existing</em> depends on the <em class="placeholder">config_test.dynamic.dotted.deleted</em> configuration that will not exist after import.', @@ -651,7 +648,6 @@ public function testUnmetDependency() { 'Unable to install the <em class="placeholder">unknown_module</em> module since it does not exist.', 'Unable to install the <em class="placeholder">Book</em> module since it requires the <em class="placeholder">Node, Text, Field, Filter, User</em> modules.', 'Unable to install the <em class="placeholder">unknown_theme</em> theme since it does not exist.', - 'Unable to install the <em class="placeholder">Bartik</em> theme since it requires the <em class="placeholder">Classy</em> theme.', 'Unable to install the <em class="placeholder">Bartik</em> theme since it requires the <em class="placeholder">Stable</em> theme.', 'Configuration <em class="placeholder">config_test.dynamic.dotted.config</em> depends on configuration (<em class="placeholder">unknown, unknown2</em>) that will not exist after import.', 'Configuration <em class="placeholder">config_test.dynamic.dotted.existing</em> depends on the <em class="placeholder">config_test.dynamic.dotted.deleted</em> configuration that will not exist after import.', diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ConfirmClassyCopiesTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ConfirmClassyCopiesTest.php index 5a3ede69838c698a59dbe8f052ade863b7cc6496..4430cab445c72aebc8fd47677a8f645df277d3a1 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/ConfirmClassyCopiesTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/ConfirmClassyCopiesTest.php @@ -130,7 +130,6 @@ public function providerTestClassyCopies() { 'form.css', 'forum.css', 'icons.css', - 'image-widget.css', 'inline-form.css', 'item-list.css', 'link.css', @@ -535,7 +534,6 @@ public function providerTestClassyCopies() { 'ui-dialog.css', 'user.css', 'item-list.css', - 'image-widget.css', 'field.css', 'tablesort.css', 'tabs.css', @@ -550,7 +548,6 @@ public function providerTestClassyCopies() { 'form.css', 'exposed-filters.css', 'tabledrag.css', - 'indented.css', 'messages.css', 'pager.css', 'search-results.css', diff --git a/core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php b/core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php index 54a0842cccaa0ea4ed475a7e198db29a03daef56..8f09bcd5a4e586b263fdc7f8775e2f54dc5e4493 100644 --- a/core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Theme/MaintenanceThemeTest.php @@ -27,7 +27,7 @@ public function testMaintenanceTheme() { $base_themes = $active_theme->getBaseThemeExtensions(); $base_theme_names = array_keys($base_themes); - $this->assertSame(['classy', 'stable'], $base_theme_names); + $this->assertSame(['stable'], $base_theme_names); } } diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemeNotUsingClassyLibraryTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemeNotUsingClassyLibraryTest.php deleted file mode 100644 index 290c2ab9c0e9ae0ae5a68bdcbefa5440012e6ce3..0000000000000000000000000000000000000000 --- a/core/tests/Drupal/KernelTests/Core/Theme/ThemeNotUsingClassyLibraryTest.php +++ /dev/null @@ -1,447 +0,0 @@ -<?php - -namespace Drupal\KernelTests\Core\Theme; - -use Drupal\KernelTests\KernelTestBase; - -/** - * Tests that themes do not depend on Classy libraries. - * - * These tests exist to facilitate the process of decoupling theme from Classy. - * The decoupling process includes replacing the use of all Classy libraries - * with theme-specific ones. These tests ensure these replacements are properly - * implemented. - * - * @group Theme - */ -class ThemeNotUsingClassyLibraryTest extends KernelTestBase { - - /** - * The theme initialization. - * - * @var \Drupal\Core\Theme\ThemeInitializationInterface - */ - protected $themeInitialization; - - /** - * The library discovery service. - * - * @var \Drupal\Core\Asset\LibraryDiscoveryInterface - */ - protected $libraryDiscovery; - - /** - * The theme handler. - * - * @var \Drupal\Core\Extension\ThemeHandlerInterface - */ - protected $themeHandler; - - /** - * Classy's libraries. - * - * These are the libraries defined in classy.libraries.yml. - * - * @var string[][] - * - * @see \Drupal\Core\Asset\LibraryDiscoveryInterface::getLibrariesByExtension() - */ - protected $classyLibraries; - - /** - * Libraries that Classy extends. - * - * These are the libraries listed in `libraries-extend` in classy.info.yml. - * - * @var string[][] - */ - protected $classyLibrariesExtend; - - /** - * {@inheritdoc} - */ - protected function setUp() { - parent::setUp(); - - $this->themeInitialization = $this->container->get('theme.initialization'); - $this->libraryDiscovery = $this->container->get('library.discovery'); - $this->themeHandler = $this->container->get('theme_handler'); - $this->container->get('theme_installer')->install([ - 'umami', - 'bartik', - 'seven', - 'claro', - ]); - $this->classyLibraries = $this->libraryDiscovery->getLibrariesByExtension('classy'); - $this->assertNotEmpty($this->classyLibraries); - $this->classyLibrariesExtend = $this->themeHandler->getTheme('classy')->info['libraries-extend']; - $this->assertNotEmpty($this->classyLibrariesExtend); - } - - /** - * Ensures that a theme is decoupled from Classy libraries. - * - * This confirms that none of the libraries defined in classy.libraries.yml - * are loaded by the current theme. For this to happen, the current theme - * must override the Classy library so no assets from Classy are loaded. - * - * @param string $theme - * The theme being tested. - * @param string[] $libraries_to_skip - * Libraries excluded from the test. - * - * @dataProvider providerTestThemeNotUsingClassyLibraries - */ - public function testThemeNotUsingClassyLibraries($theme, array $libraries_to_skip) { - // In some cases an overridden Classy library does not use any copied assets - // from Classy. This array collects those so this test knows to skip - // assertions specific to those copied assets. - $skip_asset_matching_assertions = []; - $theme_path = $this->themeHandler->getTheme($theme)->getPath(); - - // A list of all libraries that the current theme is overriding. In a - // theme's info.yml file, these are the libraries listed in - // `libraries-override:`, and are libraries altered by the current theme. - // This will be used for confirming that all of Classy's libraries are - // overridden. - $theme_library_overrides = $this->themeInitialization->getActiveThemeByName($theme)->getLibrariesOverride()[$theme_path] ?? []; - - // A list of all libraries created by the current theme. - $theme_libraries = $this->libraryDiscovery->getLibrariesByExtension($theme); - $this->assertNotEmpty($theme_libraries); - - // Loop through all libraries overridden by the theme. For those that are - // Classy libraries, confirm that the overrides prevent the loading of any - // Classy asset. - foreach ($theme_library_overrides as $library_name => $library_definition) { - $in_skip_list = in_array(str_replace('classy/', '', $library_name), $libraries_to_skip); - - // If the library name does not begin with `classy/`, it's not a Classy - // library. - $not_classy_library = substr($library_name, 0, 7) !== 'classy/'; - - // If $library_definition is false or a string, the override is preventing - // the Classy library from loading altogether. - $library_fully_replaced = $library_definition === FALSE || gettype($library_definition) === 'string'; - - // If the library is fully replaced, it may need to be added to the - // $skip_asset_matching_assertions array. - if ($library_fully_replaced) { - // Libraries with names that begin with `$theme/classy.` are copies of - // Classy libraries. - $not_copied_from_classy = gettype($library_definition) === 'string' && substr($library_definition, 0, (8 + strlen($theme))) !== "$theme/classy."; - - // If the overridden library is not copied from Classy or is FALSE (i.e. - // not loaded at all), it is customized and should skip the tests that - // check for a 1:1 asset match between the Classy library and its - // override in the current theme. - if ($library_definition === FALSE || $not_copied_from_classy) { - $skip_asset_matching_assertions[] = $library_name; - } - } - - // If any of these three conditions are true, there's no need for the - // remaining asset-specific assertions in this loop. - if ($in_skip_list || $not_classy_library || $library_fully_replaced) { - continue; - } - - // If the library override has a 'css' key, some Classy CSS files may - // still be loading. Confirm this is not the case. - if (isset($library_definition['css'])) { - $this->confirmNoClassyAssets($library_name, $library_definition, 'css'); - - // If the override has no JS and all Classy CSS is accounted for, add it - // to the list of libraries already fully overridden. It won't be - // necessary to copy the library from Classy. - if (!isset($library_definition['js'])) { - $skip_asset_matching_assertions[] = $library_name; - } - } - if (isset($library_definition['js'])) { - $this->confirmNoClassyAssets($library_name, $library_definition, 'js'); - - // CSS has already been checked. So, if all JS in the library is - // accounted for, add it to the list of libraries already fully - // overridden. It won't be necessary to copy the library from Classy. - $skip_asset_matching_assertions[] = $library_name; - } - } - - // Confirm that every Classy library is copied or fully overridden by the - // current theme. - foreach ($this->classyLibraries as $classy_library_name => $classy_library) { - // If a Classy library is in the $skip_asset_matching_assertions - // array, it does not use any assets copied from Classy and can skip the - // tests in this loop. - $fully_overridden = in_array("classy/$classy_library_name", $skip_asset_matching_assertions); - $skip = in_array($classy_library_name, $libraries_to_skip); - if ($skip || $fully_overridden) { - continue; - } - // Confirm the Classy Library is overridden so assets aren't loaded twice. - $this->assertArrayHasKey("classy/$classy_library_name", $theme_library_overrides, "The classy/$classy_library_name library is not overridden in $theme"); - - // Confirm there is a theme-specific version of the Classy library. - $this->assertArrayHasKey("classy.$classy_library_name", $theme_libraries, "There is not a $theme equivalent for classy/$classy_library_name"); - $theme_copy_of_classy_library = $theme_libraries["classy.$classy_library_name"]; - - // If the Classy library includes CSS, confirm the theme's copy has the - // same CSS with the same properties. - if (!empty($classy_library['css'])) { - $this->confirmMatchingAssets($classy_library_name, $classy_library, $theme_copy_of_classy_library, $theme_path, 'css'); - } - - // If the Classy library includes JavaScript, confirm the theme's copy has - // the same JavaScript with the same properties. - if (!empty($classy_library['js'])) { - $this->confirmMatchingAssets($classy_library_name, $classy_library, $theme_copy_of_classy_library, $theme_path, 'js'); - } - } - } - - /** - * Checks for theme-specific equivalents of all Classy library-extends. - * - * Classy extends several core libraries with its own assets, these are - * defined in the `libraries-extend:` list in classy.info.yml. Classy adds - * additional assets to these libraries (e.g. when the `file/drupal.file` - * library loads, the assets of `classy/file` are loaded as well). For a theme - * to be properly decoupled from Classy's libraries, these core library - * extensions must become the responsibility of that theme. - * - * @param string $theme - * The theme being tested. - * @param string[] $extends_to_skip - * Classy library-extends excluded from the test. - * - * @dataProvider providerTestThemeAccountsForClassyExtensions - */ - public function testThemeAccountsForClassyExtensions($theme, array $extends_to_skip) { - $theme_path = $this->themeHandler->getTheme($theme)->getPath(); - - // Get a list of libraries overridden by the current theme. In a theme's - // info.yml file, these are the libraries listed in `libraries-override:`. - // They are libraries altered by the current theme. - $theme_library_overrides = $this->themeInitialization->getActiveThemeByName($theme)->getLibrariesOverride()[$theme_path] ?? []; - - // Get a list of libraries extended by the current theme. In a theme's - // info.yml file, these are the libraries listed in `libraries-extend:`. - // The current theme adds additional files to these libraries. - $theme_extends = $this->themeHandler->getTheme($theme)->info['libraries-extend'] ?? []; - - // Some Classy libraries extend core libraries (i.e. they are not standalone - // libraries. Rather, they extend the functionality of existing core - // libraries). These extensions that were implemented in Classy need to be - // accounted for in the current theme by either 1) The current theme - // extending the core library with local copy of the Classy library 2) - // Overriding the core library altogether. - // The following iterates through each library extended by Classy to confirm - // that the current theme accounts for these these extensions. - foreach ($this->classyLibrariesExtend as $library_extended => $info) { - if (in_array($library_extended, $extends_to_skip)) { - continue; - } - - $extends_core_library = isset($theme_extends[$library_extended]); - $overrides_core_library = isset($theme_library_overrides[$library_extended]); - - // Every core library extended by Classy must be extended or overridden by - // the current theme. - $this->assertTrue(($extends_core_library || $overrides_core_library), "$library_extended is extended by Classy and should be extended or overridden by $theme"); - - // If the core library is overridden, confirm that the override does not - // include any Classy assets. - if ($overrides_core_library) { - $overridden_with = $theme_library_overrides[$library_extended]; - - // A library override variable can be one of three types: - // - bool (set to false): this means the override simply prevents the - // library from loading. - // - array: this means some files in the overridden library are changed, - // but not necessarily all of them. - // - string (which is what is being looked for here): this means the - // library is replaced with a completely different library. - $override_replaces_library = (gettype($overridden_with) === 'string'); - if ($override_replaces_library) { - // Make sure the replacement library does not come from Classy. - $this->assertFalse(substr($overridden_with, 0, 7) === 'classy/', "$library_extended is replaced with $overridden_with. The replacement should not be a Classy library."); - } - - // If the override doesn't prevent the core library from loading - // entirely, and it doesn't replace it with another library, each asset - // must be checked to confirm it isn't coming from Classy. - if ($overridden_with !== FALSE && !$override_replaces_library) { - foreach (['component', 'layout'] as $category) { - if (isset($overridden_with['css'][$category])) { - foreach ($overridden_with['css'][$category] as $css_file) { - $this->assertFalse(strpos($css_file, 'core/themes/classy/css'), "Override is loading a Classy asset: $css_file"); - } - } - } - if (isset($overridden_with['js'])) { - foreach ($overridden_with['js'] as $js_file) { - $this->assertFalse(strpos($js_file, 'core/themes/classy/js'), "Override is loading a Classy asset: $js_file"); - } - } - } - } - - // If the library is extended, make sure it's not being extended with a - // Classy library. - if ($extends_core_library) { - foreach ($theme_extends[$library_extended] as $library) { - $this->assertFalse(substr($library, 0, 7) === 'classy/', "$theme is extending the core library: $library_extended with $library. Core libraries should not be extended with a Classy library."); - } - } - } - } - - /** - * Confirms a library is not loading any Classy assets. - * - * @param string $library_name - * The library name. - * @param string[][] $library_definition - * The data for a library, as defined in a theme's `.libraries.yml` file. - * @param string $type - * The type of asset, either 'js' or 'css'. - */ - protected function confirmNoClassyAssets($library_name, array $library_definition, $type) { - // Get the Classy version of the library being overridden. - $classy_library = $this->classyLibraries[str_replace('classy/', '', $library_name)]; - - // Get a list of all CSS or JS files loaded by the Classy library. - $files_used_in_classy_library = array_map(function ($item) { - return str_replace('core/themes/classy/', '', $item['data']); - }, $classy_library[$type]); - - $files_used_by_library_override = []; - if ($type === 'js') { - foreach ($library_definition[$type] as $js_file => $options) { - $files_used_by_library_override[] = $js_file; - } - } - elseif ($type === 'css') { - foreach (['component', 'layout'] as $category) { - if (isset($library_definition[$type][$category])) { - foreach ($library_definition[$type][$category] as $css_file => $options) { - $files_used_by_library_override[] = $css_file; - } - } - } - } - - $classy_files_still_loading = array_diff($files_used_in_classy_library, $files_used_by_library_override); - $this->assertEmpty($classy_files_still_loading, "$library_name is overridden, but the theme is still loading these files from Classy. " . print_r($classy_files_still_loading, 1)); - } - - /** - * Confirms that the assets of a copied Classy library match the original's. - * - * @param string $classy_library_name - * The name of the Classy library. - * @param array[] $classy_library_data - * The Classy library's data. - * @param array[] $theme_copy_of_classy_library - * The theme's copy of the Classy library. - * @param string $theme_path - * The path to the current theme. - * @param string $type - * The asset type, either 'js' or 'css'. - */ - protected function confirmMatchingAssets($classy_library_name, array $classy_library_data, array $theme_copy_of_classy_library, $theme_path, $type) { - $this->assertArrayHasKey($type, $theme_copy_of_classy_library); - $theme_assets = []; - $classy_assets = []; - - // Create arrays of Classy and copied assets with a structure that - // facilitates easy comparison. - foreach ($theme_copy_of_classy_library[$type] as $item) { - $key = str_replace("$theme_path/$type/classy/", '', $item['data']); - $theme_assets[$key] = $item; - - // Remove the data key as it's the only one that shouldn't match. - unset($theme_assets[$key]['data']); - } - foreach ($classy_library_data[$type] as $item) { - $key = str_replace("core/themes/classy/$type/", '', $item['data']); - $classy_assets[$key] = $item; - - // Remove the data key as it's the only one that shouldn't match. - unset($classy_assets[$key]['data']); - } - - $this->assertNotEmpty($theme_assets); - $this->assertNotEmpty($classy_assets); - $this->assertEmpty(array_diff_key($theme_assets, $classy_assets), "Missing the inclusion of one or more files from classy/$classy_library_name."); - - // Confirm the properties of each copied file are identical. - foreach ($classy_assets as $file => $properties) { - foreach ($properties as $property => $value) { - $this->assertEqual($theme_assets[$file][$property], $value, "The copied file: $file from classy/$classy_library_name has a non-matching property: $property"); - } - } - } - - /** - * Data provider. - * - * The to-skip arrays should become increasingly smaller as issues that - * remove Classy library dependencies are completed. - * - * @return array[] - * Themes and the libraries to be ignored. - */ - public function providerTestThemeNotUsingClassyLibraries() { - return [ - 'claro' => [ - 'theme-name' => 'claro', - 'to-skip' => [], - ], - 'umami' => [ - 'theme-name' => 'umami', - 'to-skip' => [], - ], - 'bartik' => [ - 'theme-name' => 'bartik', - 'to-skip' => [], - ], - 'seven' => [ - 'theme-name' => 'seven', - 'to-skip' => [], - ], - ]; - } - - /** - * Data provider. - * - * The to-skip arrays should become increasingly smaller as issues that - * remove Classy library dependencies are completed. - * - * @return array[] - * Themes and the extensions to be ignored. - */ - public function providerTestThemeAccountsForClassyExtensions() { - return [ - [ - 'theme-name' => 'claro', - 'to-skip' => [], - ], - [ - 'theme-name' => 'umami', - 'to-skip' => [], - ], - [ - 'theme-name' => 'bartik', - 'to-skip' => [], - ], - [ - 'theme-name' => 'seven', - 'to-skip' => [], - ], - ]; - } - -} diff --git a/core/tests/Drupal/KernelTests/Core/Theme/ThemesNotUsingClassyTemplatesTest.php b/core/tests/Drupal/KernelTests/Core/Theme/ThemesNotUsingClassyTemplatesTest.php deleted file mode 100644 index 860163fd1648af3e66655901cbef1bf3cf7cfd97..0000000000000000000000000000000000000000 --- a/core/tests/Drupal/KernelTests/Core/Theme/ThemesNotUsingClassyTemplatesTest.php +++ /dev/null @@ -1,193 +0,0 @@ -<?php - -namespace Drupal\KernelTests\Core\Theme; - -use Drupal\Core\Theme\Registry; -use Drupal\KernelTests\KernelTestBase; - -/** - * Tests that themes do not depend on Classy templates. - * - * These tests exist to facilitate the process of decoupling themes from - * Classy. The decoupling process includes eliminating the use of Classy - * templates by providing theme-specific versions of templates that would - * otherwise be inherited from Classy. - * - * This test can be removed once the Classy decoupling is complete, and it will - * fail if it is still present when Classy is removed from Drupal core. - * - * @group Theme - */ -class ThemesNotUsingClassyTemplatesTest extends KernelTestBase { - - /** - * {@inheritdoc} - */ - public static $modules = ['system', 'user']; - - /** - * The theme handler. - * - * @var \Drupal\Core\Extension\ThemeHandlerInterface - */ - protected $themeHandler; - - /** - * Templates that are identical in Stable, which means they can be skipped. - * - * In several cases, the templates in Classy are identical to those in - * Stable. This means that a theme would behave identically even if those - * templates were removed from Classy. They are effectively decoupled from - * Classy already as they rely on no functionality unique to Classy. - * - * @var string[] - * - * @see \Drupal\Tests\Core\Theme\ClassyTemplatesIdenticalToStableTest for a - * test that confirms that these templates are identical. - */ - protected $templatesSkippableBecauseIdenticalToStable = [ - 'file-upload-help', - 'file-widget-multiple', - 'image-formatter', - 'image-style', - 'checkboxes', - 'confirm-form', - 'container', - 'dropbutton-wrapper', - 'field-multiple-value-form', - 'form', - 'input', - 'select', - 'links', - 'menu-local-action', - 'pager', - 'vertical-tabs', - 'views-view-grid', - 'views-view-list', - 'views-view-mapping-test', - 'views-view-opml', - 'views-view-row-opml', - 'views-view-rss', - 'views-view-unformatted', - ]; - - /** - * {@inheritdoc} - */ - protected function setUp() { - parent::setUp(); - $this->themeHandler = $this->container->get('theme_handler'); - $this->container->get('theme_installer')->install([ - 'umami', - 'bartik', - 'seven', - 'claro', - ]); - // Enable all modules so every template is present in the theme registry. - // This makes it possible to check the source of every template and - // determine if they come from Classy. - $this->installAllModules(); - } - - /** - * Installs all core modules. - */ - protected function installAllModules() { - // Enable all core modules. - $all_modules = $this->container->get('extension.list.module')->getList(); - $all_modules = array_filter($all_modules, function ($module) { - // Filter contrib, hidden, experimental, already enabled modules, and - // modules in the Testing package. - if ($module->origin !== 'core' || !empty($module->info['hidden']) || $module->status === TRUE || $module->info['package'] === 'Testing' || $module->info['package'] === 'Core (Experimental)') { - return FALSE; - } - return TRUE; - }); - $all_modules = array_keys($all_modules); - $module_installer = $this->container->get('module_installer'); - $module_installer->install($all_modules); - } - - /** - * Ensures that themes are not inheriting templates from Classy. - * - * @param string $theme - * The theme to test. - * @param string[] $templates_to_skip - * Templates that will not be tested. - * - * @dataProvider providerTestThemesTemplatesNotClassy - */ - public function testThemesTemplatesNotClassy($theme, array $templates_to_skip) { - // Get every template available to the theme being tested. - $theme_registry = new Registry($this->root, \Drupal::cache(), \Drupal::lock(), \Drupal::moduleHandler(), $this->themeHandler, \Drupal::service('theme.initialization'), $theme); - $theme_registry->setThemeManager(\Drupal::theme()); - $theme_registry_full = $theme_registry->get(); - - // Add views-form-views-form to the skipped templates array. It is - // registered via views_theme() in views.module, but does not represent an - // actual template. - $templates_to_skip[] = 'views-form-views-form'; - - // Loop through every template available to the current theme, confirm it - // does not come from Classy, does not attach Classy libraries, and does not - // extend or include Classy templates. - foreach ($theme_registry_full as $info) { - if (isset($info['template'])) { - $template_name = $info['template']; - - if (in_array($template_name, $templates_to_skip) || in_array($template_name, $this->templatesSkippableBecauseIdenticalToStable)) { - continue; - } - - $template_contents = file_get_contents("{$this->root}/{$info['path']}/$template_name.html.twig"); - - // Confirm template does not come from Classy. - $this->assertFalse($info['theme path'] === 'core/themes/classy', "$theme is inheriting $template_name from Classy."); - - // Confirm template does not include or extend Classy templates. - preg_match_all('/(extends|include)\s+(\'|")@classy/', $template_contents, $classy_extend_include_matches); - $this->assertEmpty($classy_extend_include_matches[0], "The template: '$template_name' in the theme: '$theme' includes or extends a Classy template."); - - // Confirm template does not attach a Classy library. - preg_match_all('/attach_library\((\'|")classy\/.+(\'|")\)/', $template_contents, $classy_extend_library_matches); - $this->assertEmpty($classy_extend_library_matches[0], "The template: '$template_name' in the theme: '$theme' attaches a Classy library."); - } - } - } - - /** - * Data provider for testThemesTemplatesNotClassy(). - * - * @return array - * Array of test cases using these keys: - * -'theme-name': The machine name of the theme being tested. - * -'to-skip': Templates that will skipped by the test. - */ - public function providerTestThemesTemplatesNotClassy() { - // Each item provides the theme name and an array of templates to skip. The - // templates in the to-skip array are ones that have not yet been decoupled - // from Classy. When a template is properly decoupled from Classy, it can be - // removed from to-skip. If this test passes with an empty to-skip array, - // this is confirmation that the templates are fully decoupled form Classy. - return [ - 'umami' => [ - 'theme-name' => 'umami', - 'to-skip' => [], - ], - 'seven' => [ - 'theme-name' => 'seven', - 'to-skip' => [], - ], - 'claro' => [ - 'theme-name' => 'claro', - 'to-skip' => [], - ], - 'bartik' => [ - 'theme-name' => 'bartik', - 'to-skip' => [], - ], - ]; - } - -} diff --git a/core/themes/bartik/bartik.info.yml b/core/themes/bartik/bartik.info.yml index 5268d33cbf4baa547663272fd0b0a2d7f13a7870..e7e4428279c9504fa8d5f66a176ddcaa3b3bb750 100644 --- a/core/themes/bartik/bartik.info.yml +++ b/core/themes/bartik/bartik.info.yml @@ -13,31 +13,16 @@ # changes. name: Bartik type: theme -base theme: classy +base theme: stable description: 'A flexible, recolorable theme with many regions and a responsive, mobile-first layout.' package: Core version: VERSION libraries: + - bartik/classy.base + - bartik/classy.messages + - core/normalize - bartik/global-styling -libraries-override: - classy/base: bartik/classy.base - classy/book-navigation: bartik/classy.book-navigation - classy/dialog: bartik/classy.dialog - classy/dropbutton: bartik/classy.dropbutton - classy/file: bartik/classy.file - classy/forum: bartik/classy.forum - classy/image-widget: bartik/classy.image-widget - classy/indented: bartik/classy.indented - classy/media_embed_ckeditor_theme: bartik/classy.media_embed_ckeditor_theme - classy/media_embed_error: bartik/classy.media_embed_error - classy/media_library: bartik/classy.media_library - classy/messages: bartik/classy.messages - classy/node: bartik/classy.node - classy/progress: bartik/classy.progress - classy/search-results: bartik/classy.search-results - classy/user: bartik/classy.user - libraries-extend: core/drupal.dialog: - bartik/classy.dialog diff --git a/core/themes/bartik/bartik.libraries.yml b/core/themes/bartik/bartik.libraries.yml index b4fa4bffe097a426df736c8f952284acd5690825..5b4a84a0f1c7c96a5556d1ee820a028a754aa356 100644 --- a/core/themes/bartik/bartik.libraries.yml +++ b/core/themes/bartik/bartik.libraries.yml @@ -144,18 +144,6 @@ classy.forum: component: css/classy/components/forum.css: { weight: -10 } -classy.image-widget: - version: VERSION - css: - component: - css/classy/components/image-widget.css: {} - -classy.indented: - version: VERSION - css: - component: - css/classy/components/indented.css: {} - classy.media_embed_ckeditor_theme: version: VERSION js: diff --git a/core/themes/bartik/css/classy/components/image-widget.css b/core/themes/bartik/css/classy/components/image-widget.css deleted file mode 100644 index 56777c41ea43d0fdd279c1ce5f1f024b949a3e58..0000000000000000000000000000000000000000 --- a/core/themes/bartik/css/classy/components/image-widget.css +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @file - * Image upload widget. - * - * This CSS file is not used in this theme (Classy). It was intended to be used, - * but due to a bug, Drupal 8 shipped with it not being used. To not break - * backwards compatibility, we continue to not load it in Classy. Every - * subtheme of Classy is encouraged to use it, by attaching the - * classy/image-widget asset library in their image-widget.html.twig file. - * - * @see core/themes/seven/templates/content-edit/image-widget.html.twig. - * - * @todo In Drupal 9, let core/themes/classy/templates/content-edit/image-widget.html.twig - * attach the classy/image-widget asset library. - */ - -.image-preview { - float: left; /* LTR */ - padding: 0 10px 10px 0; /* LTR */ -} -[dir="rtl"] .image-preview { - float: right; - padding: 0 0 10px 10px; -} -.image-widget-data { - float: left; /* LTR */ -} -[dir="rtl"] .image-widget-data { - float: right; -} -.image-widget-data .text-field { - width: auto; -} diff --git a/core/themes/bartik/css/classy/components/indented.css b/core/themes/bartik/css/classy/components/indented.css deleted file mode 100644 index 6925a06363656bf1711354630f3d60ecec90ffe6..0000000000000000000000000000000000000000 --- a/core/themes/bartik/css/classy/components/indented.css +++ /dev/null @@ -1,16 +0,0 @@ - -/** - * @file - * Basic styling for comment module. - */ - -/** - * Indent threaded comments. - */ -.indented { - margin-left: 25px; /* LTR */ -} -[dir="rtl"] .indented { - margin-right: 25px; - margin-left: 0; -} diff --git a/core/themes/claro/claro.info.yml b/core/themes/claro/claro.info.yml index 509c165bb007806e77d84d37cf816c4e5e659ca8..0de14202b1fc9e6f76590a66c5b70374b2c1907f 100644 --- a/core/themes/claro/claro.info.yml +++ b/core/themes/claro/claro.info.yml @@ -12,13 +12,15 @@ # and understand that Claro could break your modifications as it changes. name: Claro type: theme -base theme: classy +base theme: stable description: 'A clean, accessible, and powerful Drupal administration theme.' alt text: 'Screenshot of Claro, Drupal administration theme.' package: Core version: VERSION experimental: true libraries: + - core/drupal.message + - core/normalize - claro/global-styling libraries-override: system/base: @@ -62,68 +64,6 @@ libraries-override: component: assets/vendor/jquery.ui/themes/base/dialog.css: false - classy/dialog: claro/claro.drupal.dialog - - classy/base: - css: - component: - css/components/action-links.css: false - css/components/breadcrumb.css: false - css/components/button.css: false - css/components/collapse-processed.css: false - css/components/container-inline.css: css/classy/components/container-inline.css - css/components/details.css: false - css/components/dropbutton.css: false - css/components/exposed-filters.css: css/classy/components/exposed-filters.css - css/components/field.css: css/classy/components/field.css - css/components/form.css: false - css/components/icons.css: css/classy/components/icons.css - css/components/inline-form.css: css/classy/components/inline-form.css - css/components/item-list.css: css/classy/components/item-list.css - css/components/link.css: css/classy/components/link.css - css/components/links.css: css/classy/components/links.css - css/components/menu.css: css/classy/components/menu.css - css/components/more-link.css: css/classy/components/more-link.css - css/components/pager.css: false - css/components/tabledrag.css: false - css/components/tableselect.css: css/components/tableselect.css - css/components/tablesort.css: css/classy/components/tablesort.css - css/components/tabs.css: false - css/components/textarea.css: css/classy/components/textarea.css - css/components/ui-dialog.css: css/classy/components/ui-dialog.css - - classy/book-navigation: claro/classy.book-navigation - - classy/dropbutton: - css: - component: - css/components/dropbutton.css: false - - classy/file: claro/classy.file - - classy/forum: claro/classy.forum - - classy/image-widget: claro/image-widget - - classy/indented: claro/classy.indented - - classy/media_embed_ckeditor_theme: claro/classy.media_embed_ckeditor_theme - - classy/media_embed_error: claro/classy.media_embed_error - - classy/messages: - css: - component: - css/components/messages.css: false - - classy/node: claro/classy.node - - classy/progress: claro/progress - - classy/search-results: claro/classy.search-results - - classy/user: false - user/drupal.user: claro/form.password-confirm field_ui/drupal.field_ui: @@ -146,12 +86,6 @@ libraries-override: theme: /core/themes/stable/css/views_ui/views_ui.admin.theme.css: css/theme/views_ui.admin.theme.css - # Drupal throws an IncompleteLibraryDefinitionException if a base theme - # defined library is set to false in a subtheme's libraries-override. We use - # 'claro/empty' for working around this behavior. - # @see https://www.drupal.org/node/3098375 - classy/media_library: claro/empty - libraries-extend: ckeditor/drupal.ckeditor: - claro/ckeditor-editor diff --git a/core/themes/claro/claro.libraries.yml b/core/themes/claro/claro.libraries.yml index 6c0cc22cc4d949686fdc0ebcfd616e4cd4be45a8..4a9131d4d03ce988849fe092ce1d160c80764da9 100644 --- a/core/themes/claro/claro.libraries.yml +++ b/core/themes/claro/claro.libraries.yml @@ -6,6 +6,19 @@ global-styling: css/base/typography.css: {} css/base/print.css: {} component: + css/classy/components/container-inline.css: {} + css/classy/components/exposed-filters.css: {} + css/classy/components/field.css: {} + css/classy/components/icons.css: {} + css/classy/components/inline-form.css: {} + css/classy/components/item-list.css: {} + css/classy/components/link.css: {} + css/classy/components/links.css: {} + css/classy/components/menu.css: {} + css/classy/components/more-link.css: {} + css/classy/components/tablesort.css: {} + css/classy/components/textarea.css: {} + css/classy/components/ui-dialog.css: {} css/components/accordion.css: {} css/components/action-link.css: {} css/components/content-header.css: {} @@ -41,6 +54,7 @@ global-styling: css/components/system-status-report.css: {} css/components/system-status-report-counters.css: {} css/components/system-status-counter.css: {} + css/components/tableselect.css: {} css/components/tabs.css: {} css/components/views-ui.css: {} theme: @@ -64,14 +78,6 @@ global-styling: # it has to be always attached. - core/modernizr -# Drupal throws an IncompleteLibraryDefinitionException if a base theme defined -# library is set to false in a subtheme's libraries-override. This empty -# library is used as a workaround. -# @see https://www.drupal.org/node/3098375 -empty: - version: VERSION - css: {} - node-form: version: VERSION css: diff --git a/core/themes/claro/css/layout/image-widget.css b/core/themes/claro/css/layout/image-widget.css deleted file mode 100644 index b1ea2e776ff9dbe002632566fcc1991ffd60360f..0000000000000000000000000000000000000000 --- a/core/themes/claro/css/layout/image-widget.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * DO NOT EDIT THIS FILE. - * See the following change record for more information, - * https://www.drupal.org/node/2815083 - * @preserve - */ - -/** - * @file - * Image widget styles. - */ - -.image-widget-data { - max-width: 100%; -} diff --git a/core/themes/claro/css/layout/image-widget.pcss.css b/core/themes/claro/css/layout/image-widget.pcss.css deleted file mode 100644 index 93d96f8a026f487fe70449e2d184571945fa32e0..0000000000000000000000000000000000000000 --- a/core/themes/claro/css/layout/image-widget.pcss.css +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @file - * Image widget styles. - */ - -.image-widget-data { - max-width: 100%; -} diff --git a/core/themes/seven/seven.info.yml b/core/themes/seven/seven.info.yml index 545585a8ec4f7b7c258f96082a94e77674ca91cf..e0220a62070fc2f0ccfff06aa7c18b6256be3c2d 100644 --- a/core/themes/seven/seven.info.yml +++ b/core/themes/seven/seven.info.yml @@ -13,13 +13,15 @@ # changes. name: Seven type: theme -base theme: classy +base theme: stable description: 'The default administration theme for Drupal 8 was designed with clean lines, simple blocks, and sans-serif font to emphasize the tools and tasks at hand.' alt text: 'Default administration theme for Drupal 8 with simple blocks and clean lines.' package: Core version: VERSION libraries: - - seven/global-styling + - seven/classy.messages + - core/normalize + - seven/global-styling libraries-override: system/base: css: @@ -40,53 +42,6 @@ libraries-override: css: component: assets/vendor/jquery.ui/themes/base/dialog.css: false - classy/dialog: - seven/seven.drupal.dialog - classy/base: - css: - component: - css/components/action-links.css: css/classy/components/action-links.css - css/components/breadcrumb.css: css/classy/components/breadcrumb.css - css/components/button.css: css/classy/components/button.css - css/components/collapse-processed.css: css/classy/components/collapse-processed.css - css/components/container-inline.css: css/classy/components/container-inline.css - css/components/details.css: false - css/components/exposed-filters.css: css/classy/components/exposed-filters.css - css/components/field.css: css/classy/components/field.css - css/components/form.css: css/classy/components/form.css - css/components/icons.css: css/classy/components/icons.css - css/components/inline-form.css: css/classy/components/inline-form.css - css/components/item-list.css: css/classy/components/item-list.css - css/components/link.css: css/classy/components/link.css - css/components/links.css: css/classy/components/links.css - css/components/menu.css: css/classy/components/menu.css - css/components/more-link.css: css/classy/components/more-link.css - css/components/pager.css: css/classy/components/pager.css - css/components/tabledrag.css: css/classy/components/tabledrag.css - css/components/tableselect.css: css/classy/components/tableselect.css - css/components/tablesort.css: css/classy/components/tablesort.css - css/components/tabs.css: css/classy/components/tabs.css - css/components/textarea.css: css/classy/components/textarea.css - css/components/ui-dialog.css: css/classy/components/ui-dialog.css - - classy/media_library: - css: - layout: - css/layout/media-library.css: false - - classy/book-navigation: seven/classy.book-navigation - classy/dropbutton: seven/classy.dropbutton - classy/file: seven/classy.file - classy/forum: seven/classy.forum - classy/image-widget: seven/classy.image-widget - classy/indented: seven/classy.indented - classy/media_embed_ckeditor_theme: seven/classy.media_embed_ckeditor_theme - classy/media_embed_error: seven/classy.media_embed_error - classy/messages: seven/classy.messages - classy/node: seven/classy.node - classy/progress: seven/classy.progress - classy/search-results: seven/classy.search-results - classy/user: seven/classy.user libraries-extend: core/ckeditor: diff --git a/core/themes/seven/seven.libraries.yml b/core/themes/seven/seven.libraries.yml index 7faf0a0a2757e89a8e21f5ff3a726f735c7277b3..18f62e95ea0e1cd8e9908967ff90a8e01462c48f 100644 --- a/core/themes/seven/seven.libraries.yml +++ b/core/themes/seven/seven.libraries.yml @@ -6,6 +6,28 @@ global-styling: css/base/typography.css: {} css/base/print.css: {} component: + css/classy/components/action-links.css: {} + css/classy/components/breadcrumb.css: {} + css/classy/components/button.css: {} + css/classy/components/collapse-processed.css: {} + css/classy/components/container-inline.css: {} + css/classy/components/exposed-filters.css: {} + css/classy/components/field.css: {} + css/classy/components/form.css: {} + css/classy/components/icons.css: {} + css/classy/components/inline-form.css: {} + css/classy/components/item-list.css: {} + css/classy/components/link.css: {} + css/classy/components/links.css: {} + css/classy/components/menu.css: {} + css/classy/components/more-link.css: {} + css/classy/components/pager.css: {} + css/classy/components/tabledrag.css: {} + css/classy/components/tableselect.css: {} + css/classy/components/tablesort.css: {} + css/classy/components/tabs.css: {} + css/classy/components/textarea.css: {} + css/classy/components/ui-dialog.css: {} css/components/admin-list.css: {} css/components/content-header.css: {} css/components/container-inline.css: {}