diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 2664a34720125901ff6db26e7b82704174fbcd96..43d9b8fb4d331c1f7a7fd7258e7d22dd154d06ea 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -382,7 +382,7 @@ function theme_get_setting($setting_name, $theme = NULL) { if ($cache[$theme]->get('features.logo')) { $logo_path = $cache[$theme]->get('logo.path'); if ($cache[$theme]->get('logo.use_default')) { - $cache[$theme]->set('logo.url', file_create_url($theme_object->getPath() . '/logo.png')); + $cache[$theme]->set('logo.url', file_create_url($theme_object->getPath() . '/logo.svg')); } elseif ($logo_path) { $cache[$theme]->set('logo.url', file_create_url($logo_path)); diff --git a/core/modules/color/color.module b/core/modules/color/color.module index 8bbb03551a2be284d71542310ff4cd258b3bfb55..fe7c40bd83af3818b3f7093a20811d63c1788696 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -115,7 +115,7 @@ function color_preprocess_page(&$variables) { // Override logo. $logo = \Drupal::config('color.theme.' . $theme_key)->get('logo'); - if ($logo && $variables['logo'] && preg_match('!' . $theme_key . '/logo.png$!', $variables['logo'])) { + if ($logo && $variables['logo'] && preg_match('!' . $theme_key . '/logo.svg$!', $variables['logo'])) { $variables['logo'] = file_create_url($logo); } } @@ -435,7 +435,7 @@ function color_scheme_form_submit($form, FormStateInterface $form_state) { // Save palette and logo location. $config ->set('palette', $palette) - ->set('logo', $paths['target'] . 'logo.png') + ->set('logo', $paths['target'] . 'logo.svg') ->save(); // Copy over neutral images. diff --git a/core/modules/image/src/Tests/ImageThemeFunctionTest.php b/core/modules/image/src/Tests/ImageThemeFunctionTest.php index d722e77551a55aa969612229a067c425997b6b04..2291b386db38a3c840733026bbb4733051aaaae1 100644 --- a/core/modules/image/src/Tests/ImageThemeFunctionTest.php +++ b/core/modules/image/src/Tests/ImageThemeFunctionTest.php @@ -159,7 +159,7 @@ function testImageAltFunctionality() { // Test using alt directly with alt attribute. $image_with_alt_property = array( '#theme' => 'image', - '#uri' => '/core/themes/bartik/logo.png', + '#uri' => '/core/themes/bartik/logo.svg', '#alt' => 'Regular alt', '#title' => 'Test title', '#width' => '50%', @@ -174,7 +174,7 @@ function testImageAltFunctionality() { // Test using alt attribute inside attributes. $image_with_alt_attribute_alt_attribute = array( '#theme' => 'image', - '#uri' => '/core/themes/bartik/logo.png', + '#uri' => '/core/themes/bartik/logo.svg', '#width' => '50%', '#height' => '50%', '#attributes' => array( @@ -192,7 +192,7 @@ function testImageAltFunctionality() { // Test using alt attribute as property and inside attributes. $image_with_alt_attribute_both = array( '#theme' => 'image', - '#uri' => '/core/themes/bartik/logo.png', + '#uri' => '/core/themes/bartik/logo.svg', '#width' => '50%', '#height' => '50%', '#alt' => 'Kitten sustainable', diff --git a/core/modules/system/src/Form/ThemeSettingsForm.php b/core/modules/system/src/Form/ThemeSettingsForm.php index 75983f07c3e7a0a2ca2ef635a6faa5764a3f2890..79cf30505d40682c499c143b09efbe745dd10148 100644 --- a/core/modules/system/src/Form/ThemeSettingsForm.php +++ b/core/modules/system/src/Form/ThemeSettingsForm.php @@ -254,7 +254,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $theme = // Inject human-friendly values and form element descriptions for logo and // favicon. - foreach (array('logo' => 'logo.png', 'favicon' => 'favicon.ico') as $type => $default) { + foreach (array('logo' => 'logo.svg', 'favicon' => 'favicon.ico') as $type => $default) { if (isset($form[$type]['settings'][$type . '_path'])) { $element = &$form[$type]['settings'][$type . '_path']; diff --git a/core/modules/system/src/Tests/System/ThemeTest.php b/core/modules/system/src/Tests/System/ThemeTest.php index def8de6e921743be5f40cdbcd06da6f96f190d89..ccfc72711ea37ccf1bdd8fa18e275aeb2cba5461 100644 --- a/core/modules/system/src/Tests/System/ThemeTest.php +++ b/core/modules/system/src/Tests/System/ThemeTest.php @@ -72,9 +72,9 @@ function testThemeSettings() { 'src' => $GLOBALS['base_url'] . '/' . 'core/misc/druplicon.png', ), // Relative path to a file in a theme. - $default_theme_path . '/logo.png' => array( - 'form' => $default_theme_path . '/logo.png', - 'src' => $GLOBALS['base_url'] . '/' . $default_theme_path . '/logo.png', + $default_theme_path . '/logo.svg' => array( + 'form' => $default_theme_path . '/logo.svg', + 'src' => $GLOBALS['base_url'] . '/' . $default_theme_path . '/logo.svg', ), ); foreach ($supported_paths as $input => $expected) { @@ -92,9 +92,9 @@ function testThemeSettings() { ':description' => 'description', )); // Expected default values (if all else fails). - $implicit_public_file = 'logo.png'; - $explicit_file = 'public://logo.png'; - $local_file = $default_theme_path . '/logo.png'; + $implicit_public_file = 'logo.svg'; + $explicit_file = 'public://logo.svg'; + $local_file = $default_theme_path . '/logo.svg'; // Adjust for fully qualified stream wrapper URI in public filesystem. if (file_uri_scheme($input) == 'public') { $implicit_public_file = file_uri_target($input); diff --git a/core/modules/system/tests/upgrade/drupal-7.system.database.php b/core/modules/system/tests/upgrade/drupal-7.system.database.php index f15d406837d2b341e5314748110e6bce20f1637a..17c66a76c9cd906f5590ab8aa0302e00d1fd17e5 100644 --- a/core/modules/system/tests/upgrade/drupal-7.system.database.php +++ b/core/modules/system/tests/upgrade/drupal-7.system.database.php @@ -201,11 +201,11 @@ )) ->values(array( 'name' => 'color_bartik_files', - 'value' => serialize(array('public://color/bartik-09696463/logo.png', 'public://color/bartik-09696463/colors.css')), + 'value' => serialize(array('public://color/bartik-09696463/logo.svg', 'public://color/bartik-09696463/colors.css')), )) ->values(array( 'name' => 'color_bartik_logo', - 'value' => serialize('public://color/bartik-09696463/logo.png'), + 'value' => serialize('public://color/bartik-09696463/logo.svg'), )) ->values(array( 'name' => 'color_bartik_palette', @@ -224,11 +224,11 @@ )) ->values(array( 'name' => 'color_seven_files', - 'value' => serialize(array('public://color/seven-09696463/logo.png', 'public://color/seven-09696463/colors.css')), + 'value' => serialize(array('public://color/seven-09696463/logo.svg', 'public://color/seven-09696463/colors.css')), )) ->values(array( 'name' => 'color_seven_logo', - 'value' => serialize('public://color/seven-09696463/logo.png'), + 'value' => serialize('public://color/seven-09696463/logo.svg'), )) ->values(array( 'name' => 'color_seven_palette', diff --git a/core/themes/bartik/color/color.inc b/core/themes/bartik/color/color.inc index 2a02b6737f66e34dbc44bad150822ce40a4cd43a..a498b2a8f548e8cebea7c658eb54a3bda964b056 100644 --- a/core/themes/bartik/color/color.inc +++ b/core/themes/bartik/color/color.inc @@ -103,7 +103,7 @@ // Files to copy. 'copy' => array( - 'logo.png', + 'logo.svg', ), // Gradient definitions. diff --git a/core/themes/bartik/color/preview.css b/core/themes/bartik/color/preview.css index 38c694e36ac5429cab80438f314d29f05d7eec17..c063c4784d05e60eb7041dc5d3062504f9664428 100644 --- a/core/themes/bartik/color/preview.css +++ b/core/themes/bartik/color/preview.css @@ -18,7 +18,7 @@ } #preview-logo { float: left; - padding: 15px 15px 15px 10px; + padding: 15px; } #preview-site-name { color: #686868; diff --git a/core/themes/bartik/color/preview.html b/core/themes/bartik/color/preview.html index ae9aa14a6fb9e1e826817220704ad48a8470912d..39600391304ce9ec7f960d893040b31be34cd53e 100644 --- a/core/themes/bartik/color/preview.html +++ b/core/themes/bartik/color/preview.html @@ -1,7 +1,7 @@
- +
Bartik