core/modules/color/color.module | 6 +++--- core/modules/color/src/Tests/ColorTest.php | 2 +- .../modules/color_test/themes/color_test_theme/color/color.inc | 4 ++-- .../tests/modules/color_test/themes/color_test_theme/css/colors.css | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/modules/color/color.module b/core/modules/color/color.module index 0bd60e7..b192709 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -99,9 +99,9 @@ function color_css_alter(&$css) { * Replaces style sheets declared in libraries with color-altered style sheets. */ function color_library_alter(&$library, $name) { - $theme_key = \Drupal::theme()->getActiveTheme()->getName(); - $themes = \Drupal::service('theme_handler')->listInfo(); - $theme_libraries = $themes[$theme_key]->info['libraries']; + $active_theme = \Drupal::theme()->getActiveTheme(); + $theme_key = $active_theme->getName(); + $theme_libraries = $active_theme->getLibraries(); if (in_array($name, $theme_libraries)) { // Override stylesheets. $color_paths = \Drupal::config('color.theme.' . $theme_key)->get('stylesheets'); diff --git a/core/modules/color/src/Tests/ColorTest.php b/core/modules/color/src/Tests/ColorTest.php index 4df9ad6..890f6a7 100644 --- a/core/modules/color/src/Tests/ColorTest.php +++ b/core/modules/color/src/Tests/ColorTest.php @@ -67,7 +67,7 @@ protected function setUp() { 'color_test_theme' => array( 'palette_input' => 'palette[bg]', 'scheme' => 'custom', - 'scheme_color' => '#3c3c3c', + 'scheme_color' => '#3b3b3b', ), ); theme_enable(array_keys($this->themes)); diff --git a/core/modules/color/tests/modules/color_test/themes/color_test_theme/color/color.inc b/core/modules/color/tests/modules/color_test/themes/color_test_theme/color/color.inc index 959f484..bf0affe 100644 --- a/core/modules/color/tests/modules/color_test/themes/color_test_theme/color/color.inc +++ b/core/modules/color/tests/modules/color_test/themes/color_test_theme/color/color.inc @@ -15,14 +15,14 @@ 'title' => t('Default'), 'colors' => array( 'bg' => '#ff0000', - 'text' => '#3b3b3b', + 'text' => '#0000ff', ), ), 'custom' => array( 'title' => t('Custom'), 'colors' => array( 'bg' => '#ff0000', - 'text' => '#3c3c3c', + 'text' => '#3b3b3b', ), ), ), diff --git a/core/modules/color/tests/modules/color_test/themes/color_test_theme/css/colors.css b/core/modules/color/tests/modules/color_test/themes/color_test_theme/css/colors.css index fe2d53b..07a4193 100644 --- a/core/modules/color/tests/modules/color_test/themes/color_test_theme/css/colors.css +++ b/core/modules/color/tests/modules/color_test/themes/color_test_theme/css/colors.css @@ -1,5 +1,5 @@ html { - color: #3b3b3b; + color: #0000ff; } body {