diff --git a/core/lib/Drupal/Core/Asset/AssetResolver.php b/core/lib/Drupal/Core/Asset/AssetResolver.php index bc8f69f..7d959d4 100644 --- a/core/lib/Drupal/Core/Asset/AssetResolver.php +++ b/core/lib/Drupal/Core/Asset/AssetResolver.php @@ -137,15 +137,6 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize) { // Sort CSS items, so that they appear in the correct order. uasort($css, 'static::sort'); - // Allow themes to remove CSS files by CSS files full path and file name. - if ($stylesheet_remove = $theme_info->getStyleSheetsRemove()) { - foreach ($css as $key => $options) { - if (isset($stylesheet_remove[$key])) { - unset($css[$key]); - } - } - } - if ($optimize) { $css = \Drupal::service('asset.css.collection_optimizer')->optimize($css); } diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscovery.php b/core/lib/Drupal/Core/Asset/LibraryDiscovery.php index 6dd83f7..bf80a30 100644 --- a/core/lib/Drupal/Core/Asset/LibraryDiscovery.php +++ b/core/lib/Drupal/Core/Asset/LibraryDiscovery.php @@ -9,8 +9,6 @@ use Drupal\Core\Cache\CacheCollectorInterface; use Drupal\Core\Cache\CacheTagsInvalidatorInterface; -use Drupal\Core\Extension\ModuleHandlerInterface; -use Drupal\Core\Theme\ThemeManagerInterface; /** * Discovers available asset libraries in Drupal. @@ -79,7 +77,25 @@ public function getLibrariesByExtension($extension) { */ public function getLibraryByName($extension, $name) { $extension = $this->getLibrariesByExtension($extension); - return isset($extension[$name]) ? $extension[$name] : FALSE; + if (isset($extension[$name])) { + // Handle libraries that are marked for override or removal. + // @see \Drupal\Core\Asset\LibraryDiscoveryParser::applyLibrariesOverrides() + if (isset($extension[$name]['override'])) { + if ($extension[$name]['override']) { + list($new_extension, $new_name) = explode('/', $extension[$name]['override']); + $extension[$name] = $this->getLibraryByName($new_extension, $new_name); + } + else { + unset($extension[$name]); + return FALSE; + } + } + return $extension[$name]; + } + else { + return FALSE; + } + } /** diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php index 1c08bc9..47e6c2c 100644 --- a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php +++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php @@ -7,6 +7,7 @@ namespace Drupal\Core\Asset; +use Drupal\Component\Utility\SafeMarkup; use Drupal\Core\Asset\Exception\IncompleteLibraryDefinitionException; use Drupal\Core\Asset\Exception\InvalidLibraryFileException; use Drupal\Core\Asset\Exception\LibraryDefinitionMissingLicenseException; @@ -88,6 +89,7 @@ public function buildByExtension($extension) { } $libraries = $this->parseLibraryInfo($extension, $path); + $libraries = $this->applyLibrariesOverrides($libraries, $extension); foreach ($libraries as $id => &$library) { if (!isset($library['js']) && !isset($library['css']) && !isset($library['drupalSettings'])) { @@ -314,6 +316,71 @@ protected function parseLibraryInfo($extension, $path) { } /** + * Apply libraries overrides specified for the current active theme. + * + * @param array $libraries + * The libraries definitions. + * @param string $extension + * The extension in which these libraries are defined. + * + * @return array + * The modified libraries definitions. + */ + protected function applyLibrariesOverrides($libraries, $extension) { + $active_theme = $this->themeManager->getActiveTheme(); + $libraries_overrides = $active_theme->getLibrariesOverride(); + $theme_path = $active_theme->getPath(); + foreach ($libraries as $name => $library) { + // Process libraries overrides. + foreach ($libraries_overrides as $asset => $override) { + // Active theme defines an override for this library. + if ($asset === "$extension/$name") { + // Active theme defines an override for the whole library. Use the + // override key to specify that this library will be overridden when + // it is called. + // @see \Drupal\Core\Asset\LibraryDiscovery::getLibraryByName() + if ($override) { + $libraries[$name]['override'] = $override; + } + else { + $libraries[$name]['override'] = FALSE; + } + } + else if (strpos($asset, "$extension/$name/") !== FALSE) { + // Active theme defines an override for an asset within this library. + // Throw an exception if the asset is not properly specified. + if (substr_count($asset, '/') < 3) { + throw new \LogicException(SafeMarkup::format('Library asset %asset is not correctly specified.', ['%asset' => $asset])); + } + list(, , $sub_key, $value) = explode('/', $asset, 4); + if ($sub_key === 'drupalSettings') { + // drupalSettings should not be overridden. + throw new \LogicException(SafeMarkup::format('drupalSettings cannot be overridden in libraries-override. Trying to override %asset.', ['%asset' =>$asset])); + } + else if ($sub_key === 'css') { + // SMACSS category should be incorporated into the asset name. + list($category, $value) = explode('/', $value, 2); + $parents = [$sub_key, $category, $value]; + $new_parents = [$sub_key, $category, '/' . $theme_path . '/' . $override]; + } + else { + $parents = [$sub_key, $value]; + $new_parents = [$sub_key, '/' . $theme_path . '/' . $override]; + } + // Remove asset to be overridden, but keep its attributes. + $attributes = NestedArray::getValue($libraries[$name], $parents); + NestedArray::unsetValue($libraries[$name], $parents); + if ($override) { + // Replace with an override if specified. + NestedArray::setValue($libraries[$name], $new_parents, $attributes); + } + } + } + } + return $libraries; + } + + /** * Wraps drupal_get_path(). */ protected function drupalGetPath($type, $name) { diff --git a/core/lib/Drupal/Core/Theme/ActiveTheme.php b/core/lib/Drupal/Core/Theme/ActiveTheme.php index aace6f9..73f40af 100644 --- a/core/lib/Drupal/Core/Theme/ActiveTheme.php +++ b/core/lib/Drupal/Core/Theme/ActiveTheme.php @@ -60,18 +60,18 @@ class ActiveTheme { protected $extension; /** - * The stylesheets which are set to be removed by the theme. + * The libraries provided by the theme. * * @var array */ - protected $styleSheetsRemove; + protected $libraries; /** - * The libraries provided by the theme. + * The libraries or library assets overridden by the theme. * * @var array */ - protected $libraries; + protected $librariesOverride; /** * Constructs an ActiveTheme object. @@ -84,20 +84,20 @@ public function __construct(array $values) { 'path' => '', 'engine' => 'twig', 'owner' => 'twig', - 'stylesheets_remove' => [], 'libraries' => [], 'extension' => 'html.twig', 'base_themes' => [], + 'libraries_override' => [], ]; $this->name = $values['name']; $this->path = $values['path']; $this->engine = $values['engine']; $this->owner = $values['owner']; - $this->styleSheetsRemove = $values['stylesheets_remove']; $this->libraries = $values['libraries']; $this->extension = $values['extension']; $this->baseThemes = $values['base_themes']; + $this->librariesOverride = $values['libraries_override']; } /** @@ -157,15 +157,6 @@ public function getLibraries() { } /** - * Returns the removed stylesheets by the theme. - * - * @return mixed - */ - public function getStyleSheetsRemove() { - return $this->styleSheetsRemove; - } - - /** * Returns an array of base theme active theme objects keyed by name. * * The order starts with the base theme of $this and ends with the root of @@ -177,4 +168,11 @@ public function getBaseThemes() { return $this->baseThemes; } + /** + * Returns the libraries or library assets overridden by the active theme. + */ + public function getLibrariesOverride() { + return $this->librariesOverride; + } + } diff --git a/core/lib/Drupal/Core/Theme/ThemeInitialization.php b/core/lib/Drupal/Core/Theme/ThemeInitialization.php index a77271e..c94826c 100644 --- a/core/lib/Drupal/Core/Theme/ThemeInitialization.php +++ b/core/lib/Drupal/Core/Theme/ThemeInitialization.php @@ -161,27 +161,24 @@ public function getActiveTheme(Extension $theme, array $base_themes = []) { $values['path'] = $theme_path; $values['name'] = $theme->getName(); - // Prepare stylesheets from this theme as well as all ancestor themes. - // We work it this way so that we can have child themes remove CSS files - // easily from parent. - $values['stylesheets_remove'] = array(); + // Prepare libraries overrides from this theme and ancestor themes. + // This allows child themes to easily remove CSS files from base themes and + // modules. + $values['libraries_override'] = array(); - // Grab stylesheets from base theme. + // Get libraries-override declared by base theme. foreach ($base_themes as $base) { - $base_theme_path = $base->getPath(); - if (!empty($base->info['stylesheets-remove'])) { - foreach ($base->info['stylesheets-remove'] as $css_file) { - $css_file = $this->resolveStyleSheetPlaceholders($css_file); - $values['stylesheets_remove'][$css_file] = $css_file; + if (!empty($base->info['libraries-override'])) { + foreach ($base->info['libraries-override'] as $library => $override) { + $values['libraries_override'][$library] = $override; } } } - // Add stylesheets used by this theme. - if (!empty($theme->info['stylesheets-remove'])) { - foreach ($theme->info['stylesheets-remove'] as $css_file) { - $css_file = $this->resolveStyleSheetPlaceholders($css_file); - $values['stylesheets_remove'][$css_file] = $css_file; + // Add libraries-override declared by this theme. + if (!empty($theme->info['libraries-override'])) { + foreach ($theme->info['libraries-override'] as $library => $override) { + $values['libraries_override'][$library] = $override; } } diff --git a/core/modules/system/src/Tests/Asset/LibraryDiscoveryIntegrationTest.php b/core/modules/system/src/Tests/Asset/LibraryDiscoveryIntegrationTest.php index 2ddccea..9ce30b8 100644 --- a/core/modules/system/src/Tests/Asset/LibraryDiscoveryIntegrationTest.php +++ b/core/modules/system/src/Tests/Asset/LibraryDiscoveryIntegrationTest.php @@ -7,6 +7,9 @@ namespace Drupal\system\Tests\Asset; +use Drupal\Component\Utility\SafeMarkup; +use Drupal\Core\Extension\Extension; +use Drupal\Core\Theme\ActiveTheme; use Drupal\simpletest\KernelTestBase; /** @@ -42,4 +45,133 @@ public function testElementInfoByTheme() { $this->assertTrue($library_discovery->getLibraryByName('test_theme', 'kitten')); } + /** + * Tests that libraries-overrides are applied to library definitions. + */ + public function testLibrariesOverride() { + /** @var \Drupal\Core\Theme\ThemeInitializationInterface $theme_initializer */ + $theme_initializer = $this->container->get('theme.initialization'); + + /** @var \Drupal\Core\Theme\ThemeManagerInterface $theme_manager */ + $theme_manager = $this->container->get('theme.manager'); + + /** @var \Drupal\Core\Render\ElementInfoManagerInterface $element_info */ + $library_discovery = $this->container->get('library.discovery'); + + $theme_manager->setActiveTheme($theme_initializer->getActiveThemeByName('test_theme')); + + // Assert that entire library was correctly overridden. + $this->assertEqual($library_discovery->getLibraryByName('core', 'drupal.collapse'), $library_discovery->getLibraryByName('test_theme', 'collapse'), 'Entire library correctly overridden.'); + + // Assert that library asset was correctly overridden. + $library = $library_discovery->getLibraryByName('classy', 'base'); + $this->assertAssetInLibraryComponent($library['css'], 'base', 'core/modules/system/tests/themes/test_theme/css/test_theme_layout.css'); + + // Assert that entire library was correctly removed. + $this->assertFalse($library_discovery->getLibraryByName('core', 'drupal.progress'), 'Entire library correctly removed.'); + + // Assert that library asset was correctly removed. + $library = $library_discovery->getLibraryByName('core', 'drupal.dialog'); + $this->assertNoAssetInLibraryComponent($library['css'], 'drupal.dialog', 'core/misc/dialog.theme.css'); + + // Assert that overridden library asset still retains attributes. + $library = $library_discovery->getLibraryByName('core', 'jquery'); + foreach ($library['js'] as $definition) { + if ($definition['data'] == 'core/modules/system/tests/themes/test_theme/js/collapse.js') { + $this->assertTrue($definition['minified'] && $definition['weight'] == -20, 'Previous attributes retained'); + break; + } + } + } + + /** + * Tests libraries-override on drupalSettings. + */ + public function testLibrariesOverrideDrupalSettings() { + $this->container->get('theme_handler')->install(['test_theme_libraries_override_with_drupal_settings']); + + /** @var \Drupal\Core\Theme\ThemeInitializationInterface $theme_initializer */ + $theme_initializer = $this->container->get('theme.initialization'); + + /** @var \Drupal\Core\Theme\ThemeManagerInterface $theme_manager */ + $theme_manager = $this->container->get('theme.manager'); + + /** @var \Drupal\Core\Render\ElementInfoManagerInterface $element_info */ + $library_discovery = $this->container->get('library.discovery'); + + $theme_manager->setActiveTheme($theme_initializer->getActiveThemeByName('test_theme_libraries_override_with_drupal_settings')); + + // Assert that drupalSettings cannot be overridden and throws an exception. + try { + $library_discovery->getLibraryByName('core', 'drupal.ajax'); + $this->fail('Throw LogicException when trying to override drupalSettings'); + } + catch (\LogicException $e) { + if ($e->getMessage() === 'drupalSettings cannot be overridden in libraries-override. Trying to override core/drupal.ajax/drupalSettings/ajaxPageState.') { + $this->pass('Throw LogicException when trying to override drupalSettings'); + } + else { + $this->fail('Throw LogicException when trying to override drupalSettings'); + } + } + } + + /** + * Tests libraries-override on malformed assets. + */ + public function testLibrariesOverrideMalformedAsset() { + $this->container->get('theme_handler')->install(['test_theme_libraries_override_with_invalid_asset']); + + /** @var \Drupal\Core\Theme\ThemeInitializationInterface $theme_initializer */ + $theme_initializer = $this->container->get('theme.initialization'); + + /** @var \Drupal\Core\Theme\ThemeManagerInterface $theme_manager */ + $theme_manager = $this->container->get('theme.manager'); + + /** @var \Drupal\Core\Render\ElementInfoManagerInterface $element_info */ + $library_discovery = $this->container->get('library.discovery'); + + $theme_manager->setActiveTheme($theme_initializer->getActiveThemeByName('test_theme_libraries_override_with_invalid_asset')); + + // Assert that improperly formed asset "specs" throw an exception. + try { + $library_discovery->getLibraryByName('core', 'drupal.dialog'); + $this->fail('Throw LogicException when specifying invalid override'); + } + catch (\LogicException $e) { + if ($e->getMessage() === 'Library asset core/drupal.dialog/css is not correctly specified.') { + $this->pass('Throw LogicException when specifying invalid override'); + } + else { + $this->fail('Throw LogicException when specifying invalid override'); + } + } + } + + protected function assertAssetInLibraryComponent($component, $library_name, $asset, $message = NULL) { + if (!isset($message)) { + $message = SafeMarkup::format('Asset @asset found in library @library', ['@asset' => $asset, '@library' => $library_name]); + } + foreach ($component as $definition) { + if ($asset == $definition['data']) { + $this->pass($message); + return; + } + } + $this->fail($message); + } + + protected function assertNoAssetInLibraryComponent($component, $library_name, $asset, $message = NULL) { + if (!isset($message)) { + $message = SafeMarkup::format('Asset @asset not found in library @library', ['@asset' => $asset, '@library' => $library_name]); + } + foreach ($component as $definition) { + if ($asset == $definition['data']) { + $this->fail($message); + return; + } + } + $this->pass($message); + } + } diff --git a/core/modules/system/src/Tests/Theme/ThemeInfoTest.php b/core/modules/system/src/Tests/Theme/ThemeInfoTest.php index 3d376ed..bc3acc9 100644 --- a/core/modules/system/src/Tests/Theme/ThemeInfoTest.php +++ b/core/modules/system/src/Tests/Theme/ThemeInfoTest.php @@ -56,7 +56,7 @@ protected function setUp() { } /** - * Tests stylesheets-remove. + * Tests stylesheets removed by libraries-override. */ function testStylesheets() { $this->themeHandler->install(array('test_basetheme', 'test_subtheme')); diff --git a/core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml b/core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml index dcb1a2f..d545822 100644 --- a/core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml +++ b/core/modules/system/tests/themes/test_basetheme/test_basetheme.info.yml @@ -5,5 +5,5 @@ version: VERSION core: 8.x libraries: - test_basetheme/global-styling -stylesheets-remove: - - '@theme_test/css/base-remove.css' +libraries-override: + theme_test/theme_stylesheets_override_and_remove_test/css/base/css/base-remove.css: false diff --git a/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml b/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml index 6883e5a..bd6a625 100644 --- a/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml +++ b/core/modules/system/tests/themes/test_subtheme/test_subtheme.info.yml @@ -6,6 +6,6 @@ core: 8.x base theme: test_basetheme libraries: - test_subtheme/global-styling -stylesheets-remove: - - '@theme_test/css/sub-remove.css' - - '@test_basetheme/base-add.sub-remove.css' +libraries-override: + theme_test/theme_stylesheets_override_and_remove_test/css/base/css/sub-remove.css: false + test_basetheme/global-styling/css/base/base-add.sub-remove.css: false diff --git a/core/modules/system/tests/themes/test_theme/css/collapse.css b/core/modules/system/tests/themes/test_theme/css/collapse.css new file mode 100644 index 0000000..c781141 --- /dev/null +++ b/core/modules/system/tests/themes/test_theme/css/collapse.css @@ -0,0 +1,4 @@ +/** + * @file + * Test CSS asset file for test_theme.theme + */ diff --git a/core/modules/system/tests/themes/test_theme/js/collapse.js b/core/modules/system/tests/themes/test_theme/js/collapse.js new file mode 100644 index 0000000..bfb509c --- /dev/null +++ b/core/modules/system/tests/themes/test_theme/js/collapse.js @@ -0,0 +1,4 @@ +/** + * @file + * Test JS asset file for test_theme.theme + */ diff --git a/core/modules/system/tests/themes/test_theme/test_theme.info.yml b/core/modules/system/tests/themes/test_theme/test_theme.info.yml index 7ddcb2d..e285cd7 100644 --- a/core/modules/system/tests/themes/test_theme/test_theme.info.yml +++ b/core/modules/system/tests/themes/test_theme/test_theme.info.yml @@ -14,8 +14,18 @@ description: 'Theme for testing the theme system' version: VERSION base theme: classy core: 8.x -stylesheets-remove: - - '@system/css/system.module.css' +libraries-override: + system/base/css/component/css/system.module.css: false + # Replace an entire library. + core/drupal.collapse: test_theme/collapse + # Remove an entire library. + core/drupal.progress: false + # Replace one particular library asset with another. + classy/base/css/theme/css/layout.css: css/test_theme_layout.css + # Remove one particular asset. + core/drupal.dialog/css/theme/misc/dialog.theme.css: false + # It works for JS as well. + core/jquery/js/assets/vendor/jquery/jquery.min.js: js/collapse.js regions: content: Content left: Left diff --git a/core/modules/system/tests/themes/test_theme/test_theme.libraries.yml b/core/modules/system/tests/themes/test_theme/test_theme.libraries.yml new file mode 100644 index 0000000..69d07fb --- /dev/null +++ b/core/modules/system/tests/themes/test_theme/test_theme.libraries.yml @@ -0,0 +1,7 @@ +collapse: + js: + js/collapse.js: { } + + css: + base: + css/collapse.css: { } diff --git a/core/modules/system/tests/themes/test_theme_libraries_override_with_drupal_settings/test_theme_libraries_override_with_drupal_settings.info.yml b/core/modules/system/tests/themes/test_theme_libraries_override_with_drupal_settings/test_theme_libraries_override_with_drupal_settings.info.yml new file mode 100644 index 0000000..0939c27 --- /dev/null +++ b/core/modules/system/tests/themes/test_theme_libraries_override_with_drupal_settings/test_theme_libraries_override_with_drupal_settings.info.yml @@ -0,0 +1,9 @@ +name: 'Test theme libraries-override' +type: theme +description: 'Theme with drupalSettings libraries-override' +version: VERSION +base theme: classy +core: 8.x +libraries-override: + # drupalSettings libraries override. Should throw a \LogicException. + core/drupal.ajax/drupalSettings/ajaxPageState: { } diff --git a/core/modules/system/tests/themes/test_theme_libraries_override_with_invalid_asset/test_theme_libraries_override_with_invalid_asset.info.yml b/core/modules/system/tests/themes/test_theme_libraries_override_with_invalid_asset/test_theme_libraries_override_with_invalid_asset.info.yml new file mode 100644 index 0000000..ecba74e --- /dev/null +++ b/core/modules/system/tests/themes/test_theme_libraries_override_with_invalid_asset/test_theme_libraries_override_with_invalid_asset.info.yml @@ -0,0 +1,9 @@ +name: 'Test theme libraries-override' +type: theme +description: 'Theme with invalid libraries-override asset spec.' +version: VERSION +base theme: classy +core: 8.x +libraries-override: + # A malformed library asset name. Should throw a \LogicException. + core/drupal.dialog/css: false diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php index 9865cb2..2f5ed21 100644 --- a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php @@ -73,6 +73,15 @@ protected function setUp() { $this->moduleHandler = $this->getMock('Drupal\Core\Extension\ModuleHandlerInterface'); $this->themeManager = $this->getMock('Drupal\Core\Theme\ThemeManagerInterface'); + $mock_active_theme = $this->getMockBuilder('Drupal\Core\Theme\ActiveTheme') + ->disableOriginalConstructor() + ->getMock(); + $mock_active_theme->expects($this->any()) + ->method('getLibrariesOverride') + ->willReturn([]); + $this->themeManager->expects($this->any()) + ->method('getActiveTheme') + ->willReturn($mock_active_theme); $this->libraryDiscoveryParser = new TestLibraryDiscoveryParser($this->root, $this->moduleHandler, $this->themeManager); } diff --git a/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php b/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php index 4a9101d..3fe4054 100644 --- a/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php +++ b/core/tests/Drupal/Tests/Core/Theme/RegistryTest.php @@ -92,8 +92,7 @@ public function testGetRegistryForModule() { 'path' => 'core/modules/system/tests/themes/test_theme/test_theme.info.yml', 'engine' => 'twig', 'owner' => 'twig', - 'stylesheets_remove' => [], - 'stylesheets_override' => [], + 'libraries_override' => [], 'libraries' => [], 'extension' => '.twig', 'base_themes' => [], diff --git a/core/themes/bartik/bartik.info.yml b/core/themes/bartik/bartik.info.yml index fb8f2fb..fa73bcb 100644 --- a/core/themes/bartik/bartik.info.yml +++ b/core/themes/bartik/bartik.info.yml @@ -5,10 +5,10 @@ description: 'A flexible, recolorable theme with many regions and a responsive, package: Core version: VERSION core: 8.x -stylesheets-remove: - - '@classy/css/layout.css' libraries: - bartik/global-styling +libraries-override: + classy/base/css/theme/css/layout.css: false ckeditor_stylesheets: - css/base/elements.css - css/components/captions.css @@ -35,4 +35,3 @@ regions: footer_third: 'Footer third' footer_fourth: 'Footer fourth' footer_fifth: 'Footer fifth' - diff --git a/core/themes/seven/seven.info.yml b/core/themes/seven/seven.info.yml index 99a3ec1..daf74a0 100644 --- a/core/themes/seven/seven.info.yml +++ b/core/themes/seven/seven.info.yml @@ -8,9 +8,9 @@ version: VERSION core: 8.x libraries: - seven/global-styling -stylesheets-remove: - - core/assets/vendor/jquery.ui/themes/base/dialog.css - - '@classy/css/layout.css' +libraries-override: + core/jquery.ui.dialog/css/component/assets/vendor/jquery.ui/themes/base/dialog.css: false + classy/base/css/theme/css/layout.css: false quickedit_stylesheets: - css/components/quickedit.css regions: diff --git a/core/themes/stark/stark.info.yml b/core/themes/stark/stark.info.yml index 69337d5..ed70cd6 100644 --- a/core/themes/stark/stark.info.yml +++ b/core/themes/stark/stark.info.yml @@ -6,5 +6,5 @@ version: VERSION core: 8.x libraries: - stark/global-styling -stylesheets-remove: - - core/assets/vendor/normalize-css/normalize.css +libraries-override: + core/normalize/css/base/assets/vendor/normalize-css/normalize.css: false