icon; ?> |
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index ca9bf7e..52d747a 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -1135,15 +1135,13 @@ function template_preprocess_forums(&$variables) {
*/
function template_preprocess_forum_list(&$variables) {
global $user;
- $row = 0;
+
// Sanitize each forum so that the template can safely print the data.
foreach ($variables['forums'] as $id => $forum) {
$variables['forums'][$id]->description = !empty($forum->description) ? filter_xss_admin($forum->description) : '';
$variables['forums'][$id]->link = url("forum/$forum->tid");
$variables['forums'][$id]->name = check_plain($forum->name);
$variables['forums'][$id]->is_container = !empty($forum->container);
- $variables['forums'][$id]->zebra = $row % 2 == 0 ? 'odd' : 'even';
- $row++;
$variables['forums'][$id]->new_text = '';
$variables['forums'][$id]->new_url = '';
@@ -1193,11 +1191,8 @@ function template_preprocess_forum_topic_list(&$variables) {
$variables['header'] = $header;
if (!empty($variables['topics'])) {
- $row = 0;
foreach ($variables['topics'] as $id => $topic) {
$variables['topics'][$id]->icon = theme('forum_icon', array('new_posts' => $topic->new, 'num_posts' => $topic->comment_count, 'comment_mode' => $topic->comment_mode, 'sticky' => $topic->sticky, 'first_new' => $topic->first_new));
- $variables['topics'][$id]->zebra = $row % 2 == 0 ? 'odd' : 'even';
- $row++;
// We keep the actual tid in forum table, if it's different from the
// current tid then it means the topic appears in two forums, one of
diff --git a/core/modules/image/image.admin.css b/core/modules/image/image.admin.css
index 2eb9b0d..4913246 100644
--- a/core/modules/image/image.admin.css
+++ b/core/modules/image/image.admin.css
@@ -1,4 +1,3 @@
-
/**
* Image style configuration pages.
*/
@@ -51,8 +50,7 @@
.image-anchor {
width: auto;
}
-.image-anchor tr.even,
-.image-anchor tr.odd {
+.image-anchor tr.zebra {
background: none;
}
.image-anchor td {
diff --git a/core/modules/node/node.tpl.php b/core/modules/node/node.tpl.php
index c3db5ae..c56a74b 100644
--- a/core/modules/node/node.tpl.php
+++ b/core/modules/node/node.tpl.php
@@ -48,8 +48,6 @@
* - $created: Time the node was published formatted in Unix timestamp.
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
- * - $zebra: Outputs either "even" or "odd". Useful for zebra striping in
- * teaser listings.
* - $id: Position of the node. Increments each time it's output.
*
* Node status variables:
diff --git a/core/modules/simpletest/simpletest.css b/core/modules/simpletest/simpletest.css
index 86bd04b..81ae9f6 100644
--- a/core/modules/simpletest/simpletest.css
+++ b/core/modules/simpletest/simpletest.css
@@ -1,4 +1,3 @@
-
/* Test Table */
#simpletest-form-table th.select-all {
width: 1em;
@@ -46,28 +45,28 @@ div.simpletest-pass {
color: #981010;
}
-tr.simpletest-pass.odd {
+tr.simpletest-pass {
background-color: #b6ffb6;
}
-tr.simpletest-pass.even {
+tr.simpletest-pass:nth-child(even) {
background-color: #9bff9b;
}
-tr.simpletest-fail.odd {
+tr.simpletest-fail {
background-color: #ffc9c9;
}
-tr.simpletest-fail.even {
+tr.simpletest-fail:nth-child(even) {
background-color: #ffacac;
}
-tr.simpletest-exception.odd {
+tr.simpletest-exception {
background-color: #f4ea71;
}
-tr.simpletest-exception.even {
+tr.simpletest-exception:nth-child(even) {
background-color: #f5e742;
}
-tr.simpletest-debug.odd {
+tr.simpletest-debug {
background-color: #eee;
}
-tr.simpletest-debug.even {
+tr.simpletest-debug:nth-child(even) {
background-color: #fff;
}
diff --git a/core/modules/system/lib/Drupal/system/Tests/Ajax/CommandsTest.php b/core/modules/system/lib/Drupal/system/Tests/Ajax/CommandsTest.php
index faa35bb..01a03db 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Ajax/CommandsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Ajax/CommandsTest.php
@@ -142,14 +142,6 @@ class CommandsTest extends AjaxTestBase {
);
$this->assertCommand($commands, $expected, "'remove' AJAX command issued with correct command and selector");
- // Tests the 'restripe' command.
- $commands = $this->drupalPostAJAX($form_path, $edit, array('op' => t("AJAX 'restripe' command")));
- $expected = array(
- 'command' => 'restripe',
- 'selector' => '#restripe_table',
- );
- $this->assertCommand($commands, $expected, "'restripe' AJAX command issued with correct selector");
-
// Tests the 'settings' command.
$commands = $this->drupalPostAJAX($form_path, $edit, array('op' => t("AJAX 'settings' command")));
$expected = array(
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 a8a66f6..1bf9979 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php
@@ -65,16 +65,16 @@ class FunctionsTest extends WebTestBase {
),
);
$inner = ' ';
- $inner .= '- c
';
- $inner .= '- d
';
+ $inner .= '- c
';
+ $inner .= '- d
';
$inner .= ' ';
$expected = ' ';
$expected .= ' Some title';
$expected .= ' ';
- $expected .= '- a
';
- $expected .= '- b' . $inner . '
';
- $expected .= '- e
';
+ $expected .= '- a
';
+ $expected .= '- b' . $inner . '
';
+ $expected .= '- e
';
$expected .= ' ';
$this->assertThemeOutput('item_list', $variables, $expected);
@@ -119,9 +119,9 @@ class FunctionsTest extends WebTestBase {
$expected_links = '';
$expected_links .= ' ';
// Verify that passing a string as heading works.
diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/TableTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/TableTest.php
index ef51f4e..0c44129 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Theme/TableTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/TableTest.php
@@ -63,7 +63,7 @@ class TableTest extends WebTestBase {
),
);
$this->content = theme('table', array('header' => $header, 'rows' => array(), 'empty' => t('No strings available.')));
- $this->assertRaw(' No strings available. | ', t('Correct colspan was set on empty message.'));
+ $this->assertRaw(' No strings available. | ', t('Correct colspan was set on empty message.'));
$this->assertRaw('Header 1 | ', t('Table header was printed.'));
}
}
diff --git a/core/modules/system/system.admin-rtl.css b/core/modules/system/system.admin-rtl.css
index d7553b5..7c81f59 100644
--- a/core/modules/system/system.admin-rtl.css
+++ b/core/modules/system/system.admin-rtl.css
@@ -57,11 +57,11 @@ table.screenshot {
border-left: 1px solid #cdcdcd;
float: right;
}
-.theme-selector .operations li.last {
+.theme-selector .operations li:last-child {
border-left: none;
padding: 0 0.7em 0 0;
}
-.theme-selector .operations li.first {
+.theme-selector .operations li:first-child {
padding: 0 0 0 0.7em;
}
diff --git a/core/modules/system/system.admin.css b/core/modules/system/system.admin.css
index 957d3e0..1596721 100644
--- a/core/modules/system/system.admin.css
+++ b/core/modules/system/system.admin.css
@@ -222,11 +222,11 @@ table.screenshot {
list-style-type: none;
border-right: 1px solid #cdcdcd; /* LTR */
}
-.theme-selector .operations li.last {
+.theme-selector .operations li:last-child {
padding: 0 0 0 0.7em; /* LTR */
border-right: none; /* LTR */
}
-.theme-selector .operations li.first {
+.theme-selector .operations li:first-child {
padding: 0 0.7em 0 0; /* LTR */
}
#system-themes-admin-form {
diff --git a/core/modules/system/system.theme.css b/core/modules/system/system.theme.css
index d5f41e1..fb86b12 100644
--- a/core/modules/system/system.theme.css
+++ b/core/modules/system/system.theme.css
@@ -1,4 +1,3 @@
-
/**
* @file
* Basic styling for common markup.
@@ -30,8 +29,7 @@ th {
padding-right: 1em; /* LTR */
text-align: left; /* LTR */
}
-tr.even,
-tr.odd {
+tr.zebra {
background-color: #eee;
border-bottom: 1px solid #ccc;
padding: 0.1em 0.6em;
diff --git a/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module b/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
index d4074d1..7c67498 100644
--- a/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
+++ b/core/modules/system/tests/modules/ajax_forms_test/ajax_forms_test.module
@@ -232,21 +232,6 @@ function ajax_forms_test_ajax_commands_form($form, &$form_state) {
'#suffix' => '',
);
- // Shows the Ajax 'restripe' command.
- $form['restripe_command_example'] = array(
- '#type' => 'submit',
- '#value' => t("AJAX 'restripe' command"),
- '#ajax' => array(
- 'callback' => 'ajax_forms_test_advanced_commands_restripe_callback',
- ),
- '#suffix' => '
-
- first row |
- second row |
-
- ',
- );
-
// Demonstrates the Ajax 'settings' command. The 'settings' command has
// nothing visual to "show", but it can be tested via SimpleTest and via
// Firebug.
@@ -401,15 +386,6 @@ function ajax_forms_test_advanced_commands_remove_callback($form, $form_state) {
}
/**
- * Ajax callback for 'restripe'.
- */
-function ajax_forms_test_advanced_commands_restripe_callback($form, $form_state) {
- $commands = array();
- $commands[] = ajax_command_restripe('#restripe_table');
- return array('#type' => 'ajax', '#commands' => $commands);
-}
-
-/**
* Ajax callback for 'settings'.
*/
function ajax_forms_test_advanced_commands_settings_callback($form, $form_state) {
diff --git a/core/modules/taxonomy/taxonomy-term.tpl.php b/core/modules/taxonomy/taxonomy-term.tpl.php
index b1ff20e..047b853 100644
--- a/core/modules/taxonomy/taxonomy-term.tpl.php
+++ b/core/modules/taxonomy/taxonomy-term.tpl.php
@@ -26,8 +26,6 @@
* - $page: Flag for the full page state.
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
- * - $zebra: Outputs either "even" or "odd". Useful for zebra striping in
- * teaser listings.
* - $id: Position of the term. Increments each time it's output.
* - $is_front: Flags true when presented in the front page.
* - $logged_in: Flags true when the current user is a logged-in member.
diff --git a/core/modules/update/update.css b/core/modules/update/update.css
index cb20500..5206d8d 100644
--- a/core/modules/update/update.css
+++ b/core/modules/update/update.css
@@ -30,8 +30,7 @@
padding: 1em 1em .25em 1em;
}
-.update tr.even,
-.update tr.odd {
+.update tr.zebra {
border: none;
}
diff --git a/core/modules/user/user.css b/core/modules/user/user.css
index 866ee40..6e4e97f 100644
--- a/core/modules/user/user.css
+++ b/core/modules/user/user.css
@@ -1,12 +1,10 @@
-
#permissions td.module {
font-weight: bold;
}
#permissions td.permission {
padding-left: 1.5em; /* LTR */
}
-#permissions tr.odd .form-item,
-#permissions tr.even .form-item {
+#permissions tr.zebra .form-item {
white-space: normal;
}
#user-admin-settings fieldset .fieldset-description {
diff --git a/core/themes/bartik/css/style-rtl.css b/core/themes/bartik/css/style-rtl.css
index 90638eb..e47f77e 100644
--- a/core/themes/bartik/css/style-rtl.css
+++ b/core/themes/bartik/css/style-rtl.css
@@ -55,11 +55,11 @@ ul.tips {
margin-left: 2px;
margin-right: 0;
}
-.region-header #block-user-login .item-list li.last {
+.region-header #block-user-login .item-list li:last-child {
padding-left: 0;
padding-right: 0.5em;
}
-.region-header #block-user-login ul.openid-links li.last {
+.region-header #block-user-login ul.openid-links li:last-child {
padding-right: 0;
}
.region-header #user-login-form li.openid-link a,
@@ -176,11 +176,11 @@ a.button {
border-color: rgba(255, 255, 255, 0.15);
border-right: none;
}
-#footer li.first a {
+#footer li:first-child a {
padding-right: 0;
padding-left: 12px;
}
-#footer li.last a {
+#footer li:last-child a {
padding-left: 0;
padding-right: 12px;
border-left: none;
diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css
index 7773eda..e6f8d9f 100644
--- a/core/themes/bartik/css/style.css
+++ b/core/themes/bartik/css/style.css
@@ -1,4 +1,3 @@
-
/* ---------- Overall Specifications ---------- */
body {
@@ -41,7 +40,7 @@ p {
del {
text-decoration: line-through;
}
-tr.odd {
+tr.zebra:nth-child(odd) {
background-color: #dddddd;
}
img {
@@ -210,12 +209,12 @@ tr th {
border-color: #555;
border-color: rgba(255, 255, 255, 0.18);
}
-tr.odd {
+tr.zebra {
background: #e4e4e4;
background: rgba(0, 0, 0, 0.105);
}
tr,
-tr.even {
+tr.zebra:nth-child(even) {
background: #efefef;
background: rgba(0, 0, 0, 0.063);
}
@@ -371,7 +370,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 */
@@ -406,10 +405,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 */
}
-.region-header #block-user-login ul.openid-links li.last {
+.region-header #block-user-login ul.openid-links li:last-child {
padding-left: 0; /* LTR */
}
.region-header #user-login-form li.openid-link a,
@@ -755,8 +754,7 @@ ul.links {
.sidebar tbody {
border: none;
}
-.sidebar tr.even,
-.sidebar tr.odd {
+.sidebar tr.zebra {
background: none;
border-bottom: 1px solid #d6d6d6;
}
@@ -782,7 +780,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,
@@ -919,17 +917,17 @@ ul.links {
border-right: 1px solid #555; /* LTR */
border-color: rgba(255, 255, 255, 0.15);
}
-#footer li.first a {
+#footer li:first-child a {
padding-left: 0; /* LTR */
}
-#footer li.last a {
- padding-right: 0; /* LTR */
+#footer li:last-child a {
border-right: none; /* LTR */
+ padding-right: 0; /* LTR */
}
-#footer-wrapper tr.odd {
+#footer-wrapper tr.zebra {
background-color: transparent;
}
-#footer-wrapper tr.even {
+#footer-wrapper tr.zebra:nth-child(even) {
background-color: #2c2c2c;
background-color: rgba(0, 0, 0, 0.15);
}
diff --git a/core/themes/bartik/templates/node.tpl.php b/core/themes/bartik/templates/node.tpl.php
index 318197c..ac3216f 100644
--- a/core/themes/bartik/templates/node.tpl.php
+++ b/core/themes/bartik/templates/node.tpl.php
@@ -49,8 +49,6 @@
* - $created: Time the node was published formatted in Unix timestamp.
* - $classes_array: Array of html class attribute values. It is flattened
* into a string within the variable $classes.
- * - $zebra: Outputs either "even" or "odd". Useful for zebra striping in
- * teaser listings.
* - $id: Position of the node. Increments each time it's output.
*
* Node status variables:
diff --git a/core/themes/seven/reset.css b/core/themes/seven/reset.css
index de53f28..9f3e6b1 100644
--- a/core/themes/seven/reset.css
+++ b/core/themes/seven/reset.css
@@ -1,4 +1,3 @@
-
/**
* Reset CSS styles.
*
@@ -80,8 +79,7 @@ ul.links li,
/* Drupal: admin.css */
div.admin,
/* Drupal: system.css */
-tr.even,
-tr.odd,
+tr.zebra,
tr.drag,
tbody,
tbody th,
@@ -93,8 +91,7 @@ thead th,
.item-list ul li,
ol.task-list li.active,
.form-item,
-tr.odd .form-item,
-tr.even .form-item,
+tr.zebra .form-item,
.form-item .description,
.form-item label,
.form-item label.option,
diff --git a/core/themes/seven/style.css b/core/themes/seven/style.css
index ae443a4..e727fbe 100644
--- a/core/themes/seven/style.css
+++ b/core/themes/seven/style.css
@@ -1,4 +1,3 @@
-
/**
* Generic elements.
*/
@@ -442,14 +441,13 @@ table th {
border: 0;
color: #000;
}
-tr.even,
-tr.odd {
- border-width: 0 1px 0 1px;
- border-style: solid;
- border-color: #bebfb9;
+tr.zebra {
background: #f3f4ee;
+ border-color: #bebfb9;
+ border-style: solid;
+ border-width: 0 1px 0 1px;
}
-tr.odd {
+tr.zebra:nth-child(odd) {
background: #fff;
}
tr.drag {
---|
|