core/includes/menu.inc | 8 +-----
core/includes/theme.inc | 19 --------------
.../Drupal/block/Tests/Views/DisplayBlockTest.php | 2 +-
.../Tests/ContextualDynamicContextTest.php | 4 +--
core/modules/image/css/image.admin.css | 3 +++
.../menu/lib/Drupal/menu/Tests/MenuTest.php | 2 +-
core/modules/system/css/system.admin.css | 8 +++---
.../Drupal/system/Tests/Theme/FunctionsTest.php | 26 ++++++++++----------
.../tour/lib/Drupal/tour/Tests/TourTest.php | 4 +--
core/modules/views_ui/css/views_ui.admin.theme.css | 8 ++++--
.../lib/Drupal/views_ui/Tests/DisplayTest.php | 2 +-
core/themes/bartik/css/style.css | 18 +++++++-------
core/themes/seven/vertical-tabs.css | 2 +-
13 files changed, 44 insertions(+), 62 deletions(-)
diff --git a/core/includes/menu.inc b/core/includes/menu.inc
index 856c424..1d92727 100644
--- a/core/includes/menu.inc
+++ b/core/includes/menu.inc
@@ -1107,14 +1107,8 @@ function menu_tree_output($tree) {
$router_item = menu_get_item();
$num_items = count($items);
- foreach ($items as $i => $data) {
+ foreach ($items as $data) {
$class = array();
- if ($i == 0) {
- $class[] = 'first';
- }
- if ($i == $num_items - 1) {
- $class[] = 'last';
- }
// Set a class for the
-tag. Since $data['below'] may contain local
// tasks, only set 'expanded' class if the link also has children within
// the current menu.
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 4b9eb05..4561e46 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1229,14 +1229,10 @@ function theme_links($variables) {
$output .= '';
- $num_links = count($links);
- $i = 0;
$active = \Drupal::linkGenerator()->getActive();
$language_url = \Drupal::languageManager()->getLanguage(Language::TYPE_URL);
foreach ($links as $key => $link) {
- $i++;
-
$link += array(
'href' => NULL,
'route_name' => NULL,
@@ -1247,12 +1243,6 @@ function theme_links($variables) {
$class = array();
// Use the array key as class name.
$class[] = drupal_html_class($key);
- if ($i == 1) {
- $class[] = 'first';
- }
- if ($i == $num_links) {
- $class[] = 'last';
- }
$link_element = array(
'#type' => 'link',
@@ -1801,10 +1791,7 @@ function theme_item_list($variables) {
if ($items) {
$output .= '<' . $list_type . new Attribute($list_attributes) . '>';
- $num_items = count($items);
- $i = 0;
foreach ($items as &$item) {
- $i++;
$attributes = array();
if (is_array($item)) {
if (isset($item['#wrapper_attributes'])) {
@@ -1812,12 +1799,6 @@ function theme_item_list($variables) {
}
$item = drupal_render($item);
}
- if ($i == 1) {
- $attributes['class'][] = 'first';
- }
- if ($i == $num_items) {
- $attributes['class'][] = 'last';
- }
$output .= '- ' . $item . '
';
}
$output .= "$list_type>";
diff --git a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
index 1cee4b8..8082932 100644
--- a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
@@ -285,7 +285,7 @@ public function testBlockContextualLinks() {
$response = $this->drupalPost('contextual/render', 'application/json', $post, array('query' => array('destination' => 'test-page')));
$this->assertResponse(200);
$json = drupal_json_decode($response);
- $this->assertIdentical($json[$id], '');
+ $this->assertIdentical($json[$id], '');
}
}
diff --git a/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php b/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php
index de44610..7b79bff 100644
--- a/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php
+++ b/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php
@@ -78,9 +78,9 @@ function testDifferentPermissions() {
$response = $this->renderContextualLinks($ids, 'node');
$this->assertResponse(200);
$json = drupal_json_decode($response);
- $this->assertIdentical($json[$ids[0]], '');
+ $this->assertIdentical($json[$ids[0]], '');
$this->assertIdentical($json[$ids[1]], '');
- $this->assertIdentical($json[$ids[2]], '');
+ $this->assertIdentical($json[$ids[2]], '');
$this->assertIdentical($json[$ids[3]], '');
// Authenticated user: can access contextual links, cannot edit articles.
diff --git a/core/modules/image/css/image.admin.css b/core/modules/image/css/image.admin.css
index 66762e7..3e1f901 100644
--- a/core/modules/image/css/image.admin.css
+++ b/core/modules/image/css/image.admin.css
@@ -70,6 +70,9 @@
.image-anchor {
width: auto;
}
+.image-anchor tr {
+ background: none;
+}
.image-anchor td {
border: 1px solid #ccc;
}
diff --git a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
index f4f9e53..97de9e1 100644
--- a/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
+++ b/core/modules/menu/lib/Drupal/menu/Tests/MenuTest.php
@@ -418,7 +418,7 @@ public function testBlockContextualLinks() {
$response = $this->drupalPost('contextual/render', 'application/json', $post, array('query' => array('destination' => 'test-page')));
$this->assertResponse(200);
$json = drupal_json_decode($response);
- $this->assertIdentical($json[$id], '');
+ $this->assertIdentical($json[$id], '');
}
/**
diff --git a/core/modules/system/css/system.admin.css b/core/modules/system/css/system.admin.css
index 203f7d2..ea1afe3 100644
--- a/core/modules/system/css/system.admin.css
+++ b/core/modules/system/css/system.admin.css
@@ -405,18 +405,18 @@ table.system-status-report .status-title {
border-left: 1px solid #cdcdcd;
border-right: none;
}
-.theme-selector .operations li.last {
+.theme-selector .operations li:last-child {
padding: 0 0 0 0.7em; /* LTR */
border-right: none; /* LTR */
}
-[dir="rtl"] .theme-selector .operations li.last {
+[dir="rtl"] .theme-selector .operations li:last-child {
padding: 0 0.7em 0 0;
border-left: none;
}
-.theme-selector .operations li.first {
+.theme-selector .operations li:first-child {
padding: 0 0.7em 0 0; /* LTR */
}
-[dir="rtl"] .theme-selector .operations li.first {
+[dir="rtl"] .theme-selector .operations li:first-child {
padding: 0 0 0 0.7em;
}
#system-themes-admin-form {
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
index d1930c9..5c813fb 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
@@ -116,30 +116,30 @@ function testItemList() {
);
$inner_b = '';
- $inner_b .= '- ba
';
- $inner_b .= '- bb
';
+ $inner_b .= '- ba
';
+ $inner_b .= '- bb
';
$inner_b .= '
';
$inner_cb = '';
- $inner_cb .= '- cba
';
- $inner_cb .= '- cbb
';
+ $inner_cb .= '- cba
';
+ $inner_cb .= '- cbb
';
$inner_cb .= '
';
$inner_c = '';
- $inner_c .= '- ca
';
- $inner_c .= '- cb' . $inner_cb . '
';
- $inner_c .= '- cc
';
+ $inner_c .= '- ca
';
+ $inner_c .= '- cb' . $inner_cb . '
';
+ $inner_c .= '- cc
';
$inner_c .= '
';
$expected = '';
$expected .= '
Some title
';
$expected .= '
';
- $expected .= '- a
';
- $expected .= '- b' . $inner_b . '
';
- $expected .= '- c' . $inner_c . '
';
- $expected .= '- d
';
- $expected .= '';
- $expected .= '- f
';
+ $expected .= '- a
';
+ $expected .= '- b' . $inner_b . '
';
+ $expected .= '- c' . $inner_c . '
';
+ $expected .= '- d
';
+ $expected .= '';
+ $expected .= '- f
';
$expected .= '
';
$this->assertThemeOutput('item_list', $variables, $expected);
diff --git a/core/modules/tour/lib/Drupal/tour/Tests/TourTest.php b/core/modules/tour/lib/Drupal/tour/Tests/TourTest.php
index fcae023..75d196c 100644
--- a/core/modules/tour/lib/Drupal/tour/Tests/TourTest.php
+++ b/core/modules/tour/lib/Drupal/tour/Tests/TourTest.php
@@ -55,7 +55,7 @@ public function testTourFunctionality() {
// Navigate to tour-test-1 and verify the tour_test_1 tip is found with appropriate classes.
$this->drupalGet('tour-test-1');
$elements = $this->xpath('//li[@data-id=:data_id and @class=:classes and ./h2[contains(., :text)]]', array(
- ':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1 odd first',
+ ':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1',
':data_id' => 'tour-test-1',
':text' => 'The first tip',
));
@@ -69,7 +69,7 @@ public function testTourFunctionality() {
$this->assertTourTips();
$elements = $this->xpath('//li[@data-id=:data_id and @class=:classes and ./p//a[@href=:href and contains(., :text)]]', array(
- ':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1 odd first',
+ ':classes' => 'tip-module-tour-test tip-type-text tip-tour-test-1',
':data_id' => 'tour-test-1',
':href' => url('', array('absolute' => TRUE)),
':text' => 'Drupal',
diff --git a/core/modules/views_ui/css/views_ui.admin.theme.css b/core/modules/views_ui/css/views_ui.admin.theme.css
index 7245529..0a4aa70 100644
--- a/core/modules/views_ui/css/views_ui.admin.theme.css
+++ b/core/modules/views_ui/css/views_ui.admin.theme.css
@@ -514,7 +514,7 @@ ul#views-display-menu-tabs li.add ul.action-list li{
border-width: 1px 1px 0;
}
-.views-displays .secondary .action-list li.last {
+.views-displays .secondary .action-list li:last-child {
border-width: 0 1px 1px;
}
@@ -707,6 +707,10 @@ ul#views-display-menu-tabs li.add ul.action-list li{
padding-bottom: 2px;
}
+.views-ui-display-tab-bucket .views-display-setting:nth-of-type(even) {
+ background-color: #f3f5ee;
+}
+
.views-ui-display-tab-bucket .views-group-text {
margin-top: 6px;
margin-bottom: 6px;
@@ -780,7 +784,7 @@ ul#views-display-menu-tabs li.add ul.action-list li{
border-top: 1px solid #ccc;
}
-.views-filterable-options .even .form-type-checkbox {
+.views-filterable-options .filterable-option:nth-of-type(even) .form-type-checkbox {
background-color: #f3f4ee;
}
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php
index 76480e2..ae15d5c 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php
@@ -313,7 +313,7 @@ public function testPageContextualLinks() {
$response = $this->drupalPost('contextual/render', 'application/json', $post, array('query' => array('destination' => 'test-display')));
$this->assertResponse(200);
$json = drupal_json_decode($response);
- $this->assertIdentical($json[$id], '');
+ $this->assertIdentical($json[$id], '');
}
/**
diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css
index 6c7a8fc..ab61506 100644
--- a/core/themes/bartik/css/style.css
+++ b/core/themes/bartik/css/style.css
@@ -446,7 +446,7 @@ h1#site-name {
text-decoration: none;
background: rgba(255, 255, 255, 0.15);
}
-.region-header .block-menu li.last a {
+.region-header .block-menu li:last-child a {
border-bottom: 0;
}
/* User Login block in the header region */
@@ -481,10 +481,10 @@ h1#site-name {
float: left; /* LTR */
padding: 3px 0 1px;
}
-.region-header #block-user-login .item-list li.last {
+.region-header #block-user-login .item-list li:last-child {
padding-left: 0.5em; /* LTR */
}
-[dir="rtl"] .region-header #block-user-login .item-list li.last {
+[dir="rtl"] .region-header #block-user-login .item-list li:last-child {
padding-left: 0;
padding-right: 0.5em;
}
@@ -916,7 +916,7 @@ ul.links {
border-bottom: 1px solid #dfdfdf;
line-height: 1.3;
}
-#triptych .block.last {
+#triptych .block:last-child {
border-bottom: none;
}
#triptych .block ul li,
@@ -1072,18 +1072,18 @@ ul.links {
border-color: rgba(255, 255, 255, 0.15);
border-right: none;
}
-#footer .menu li.first a {
+#footer .menu li:first-child a {
padding-left: 0; /* LTR */
}
-[dir="rtl"] #footer .menu li.first a {
+[dir="rtl"] #footer .menu li:first-child a {
padding-right: 0;
padding-left: 12px;
}
-#footer .menu li.last a {
+#footer .menu li:last-child a {
padding-right: 0; /* LTR */
border-right: none; /* LTR */
}
-[dir="rtl"] #footer .menu li.last a {
+[dir="rtl"] #footer .menu li:last-child a {
padding-left: 0;
padding-right: 12px;
border-left: none;
@@ -1948,7 +1948,7 @@ div.admin-panel .description {
* The contents of the popup dialog on the views edit form.
*/
-.views-filterable-options .even .form-type-checkbox {
+.views-filterable-options .filterable-option:nth-of-type(even) .form-type-checkbox {
background-color: #F9F9F9;
}
diff --git a/core/themes/seven/vertical-tabs.css b/core/themes/seven/vertical-tabs.css
index 2bc1096..325a3af 100644
--- a/core/themes/seven/vertical-tabs.css
+++ b/core/themes/seven/vertical-tabs.css
@@ -50,7 +50,7 @@
text-shadow: 0 1px hsla(0, 0%, 100%, 0.6);
text-decoration: none;
}
-.vertical-tab-button.last a {
+.vertical-tab-button:last-child a {
border-bottom: 0;
}
.vertical-tab-button.selected a,