From de2aab89b29a5a9b3821ec22834cfea39eba5ff0 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Sat, 12 Dec 2015 00:15:41 +0000
Subject: [PATCH] Issue #2458775 by aerozeppelin, pjonckiere, dawehner: Diff UI
 is missing colors

---
 core/modules/config/src/Controller/ConfigController.php | 3 +++
 core/modules/config/src/Tests/ConfigImportUITest.php    | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/core/modules/config/src/Controller/ConfigController.php b/core/modules/config/src/Controller/ConfigController.php
index 6fb342389528..7900ed75bd6e 100644
--- a/core/modules/config/src/Controller/ConfigController.php
+++ b/core/modules/config/src/Controller/ConfigController.php
@@ -142,6 +142,9 @@ public function diff($source_name, $target_name = NULL, $collection = NULL) {
 
     $build['diff'] = array(
       '#type' => 'table',
+      '#attributes' => array(
+        'class' => array('diff'),
+      ),
       '#header' => array(
         array('data' => t('Active'), 'colspan' => '2'),
         array('data' => t('Staged'), 'colspan' => '2'),
diff --git a/core/modules/config/src/Tests/ConfigImportUITest.php b/core/modules/config/src/Tests/ConfigImportUITest.php
index 86d59eed9bef..98f11c290c9e 100644
--- a/core/modules/config/src/Tests/ConfigImportUITest.php
+++ b/core/modules/config/src/Tests/ConfigImportUITest.php
@@ -311,6 +311,10 @@ function testImportDiff() {
     // Deleted value is escaped.
     $this->assertText(Html::escape("404: '<em>herp</em>'"));
 
+    // Verify diff colors are displayed.
+    $result = $this->xpath('//table[contains(@class, :class)]', array(':class' => 'diff'));
+    $this->assertEqual(count($result), 1, "Diff UI is displaying colors.");
+
     // Reset data back to original, and remove a key
     $sync_data = $original_data;
     unset($sync_data[$remove_key]);
-- 
GitLab