diff --git a/core/includes/ajax.inc b/core/includes/ajax.inc index 328f54c..a2fc127 100644 --- a/core/includes/ajax.inc +++ b/core/includes/ajax.inc @@ -1166,28 +1166,6 @@ function ajax_command_invoke($selector, $method, array $arguments = array()) { } /** - * Creates a Drupal Ajax 'restripe' command. - * - * The 'restripe' command instructs the client to restripe a table. This is - * usually used after a table has been modified by a replace or append command. - * - * This command is implemented by Drupal.ajax.prototype.commands.restripe() - * defined in misc/ajax.js. - * - * @param $selector - * A jQuery selector string. - * - * @return - * An array suitable for use with the ajax_render() function. - */ -function ajax_command_restripe($selector) { - return array( - 'command' => 'restripe', - 'selector' => $selector, - ); -} - -/** * Creates a Drupal Ajax 'add_css' command. * * This method will add css via ajax in a cross-browser compatible way. diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 400e2ab..a3ed9c5 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -968,14 +968,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 36c8228..05e8675 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1043,11 +1043,11 @@ function theme($hook, $variables = array()) { // a function, but a template overrides that default implementation). In // these cases, a template should still be able to expect to have access to // the variables provided by template_preprocess(), so we add them here if - // they don't already exist. We don't want to run template_preprocess() - // twice (it would be inefficient and mess up zebra striping), so we use the - // 'directory' variable to determine if it has already run, which while not - // completely intuitive, is reasonably safe, and allows us to save on the - // overhead of adding some new variable to track that. + // they don't already exist. We don't want the overhead of running + // template_preprocess() twice, so we use the 'directory' variable to + // determine if it has already run, which while not completely intuitive, + // is reasonably safe, and allows us to save on the overhead of adding some + // new variable to track that. if (!isset($variables['directory'])) { $default_template_variables = array(); template_preprocess($default_template_variables, $hook); @@ -1639,22 +1639,10 @@ function theme_links($variables) { $output .= ''; - $num_links = count($links); - $i = 0; foreach ($links as $key => $link) { - $i++; - $class = array(); // Use the array key as class name. $class[] = drupal_html_class($key); - // Add odd/even, first, and last classes. - $class[] = ($i % 2 ? 'odd' : 'even'); - if ($i == 1) { - $class[] = 'first'; - } - if ($i == $num_links) { - $class[] = 'last'; - } // Handle links. if (isset($link['href'])) { @@ -1846,7 +1834,7 @@ function theme_table($variables) { // Format the table columns: if (count($colgroups)) { - foreach ($colgroups as $number => $colgroup) { + foreach ($colgroups as $colgroup) { $attributes = array(); // Check if we're dealing with a simple or complex column @@ -1867,7 +1855,6 @@ function theme_table($variables) { // Build colgroup if (is_array($cols) && count($cols)) { $output .= ' '; - $i = 0; foreach ($cols as $col) { $output .= ' '; } @@ -1913,9 +1900,7 @@ function theme_table($variables) { // Format the table rows: if (count($rows)) { $output .= "\n"; - $flip = array('even' => 'odd', 'odd' => 'even'); - $class = 'even'; - foreach ($rows as $number => $row) { + foreach ($rows as $row) { $attributes = array(); // Check if we're dealing with a simple or complex row @@ -1935,8 +1920,7 @@ function theme_table($variables) { if (count($cells)) { // Add odd/even class if (empty($row['no_striping'])) { - $class = $flip[$class]; - $attributes['class'][] = $class; + $attributes['class'][] = 'zebra'; } // Build row @@ -2020,10 +2004,7 @@ function theme_item_list($variables) { if ($items) { $output .= '<' . $type . drupal_attributes($list_attributes) . '>'; - $num_items = count($items); - $i = 0; foreach ($items as $key => $item) { - $i++; $attributes = array(); if (is_array($item)) { @@ -2056,14 +2037,6 @@ function theme_item_list($variables) { $value = $item; } - $attributes['class'][] = ($i % 2 ? 'odd' : 'even'); - if ($i == 1) { - $attributes['class'][] = 'first'; - } - if ($i == $num_items) { - $attributes['class'][] = 'last'; - } - $output .= '' . $value . '
  • '; } $output .= ""; @@ -2296,13 +2269,6 @@ function _theme_table_cell($cell, $header = FALSE) { */ function template_preprocess(&$variables, $hook) { global $user; - static $count = array(); - - // Track run count for each hook to provide zebra striping. - // See "template_preprocess_block()" which provides the same feature specific to blocks. - $count[$hook] = isset($count[$hook]) && is_int($count[$hook]) ? $count[$hook] : 1; - $variables['zebra'] = ($count[$hook] % 2) ? 'odd' : 'even'; - $variables['id'] = $count[$hook]++; // Tell all templates where they are located. $variables['directory'] = path_to_theme(); diff --git a/core/misc/ajax.js b/core/misc/ajax.js index 71399c4..a4c0038 100644 --- a/core/misc/ajax.js +++ b/core/misc/ajax.js @@ -599,19 +599,6 @@ Drupal.ajax.prototype.commands = { }, /** - * Command to restripe a table. - */ - restripe: function (ajax, response, status) { - // :even and :odd are reversed because jQuery counts from 0 and - // we count from 1, so we're out of sync. - // Match immediate children of the parent element to allow nesting. - $(response.selector).find('> tbody > tr:visible, > tr:visible') - .removeClass('odd even') - .filter(':even').addClass('odd').end() - .filter(':odd').addClass('even'); - }, - - /** * Command to add css. * * Uses the proprietary addImport method if available as browsers which diff --git a/core/misc/print.css b/core/misc/print.css index 0a56ef1..9f28e8f 100644 --- a/core/misc/print.css +++ b/core/misc/print.css @@ -1,4 +1,3 @@ - body { margin: 1em; background-color: #fff; @@ -8,10 +7,10 @@ th { color: #006; border-bottom: 1px solid #ccc; } -tr.odd { +tr.zebra { background-color: #ddd; } -tr.even { +tr.zebra:nth-child(even) { background-color: #fff; } td { diff --git a/core/misc/tabledrag.js b/core/misc/tabledrag.js index e5ffbe4..07242cb 100644 --- a/core/misc/tabledrag.js +++ b/core/misc/tabledrag.js @@ -444,7 +444,6 @@ Drupal.tableDrag.prototype.makeDraggable = function (item) { $(self.oldRowElement).removeClass('drag-previous'); } self.oldRowElement = item; - self.restripeTable(); self.onDrag(); } @@ -492,7 +491,7 @@ Drupal.tableDrag.prototype.dragRow = function (event, self) { self.setScroll(scrollAmount); } - // If we have a valid target, perform the swap and restripe the table. + // If we have a valid target, perform the swap. var currentRow = self.findDropTargetRow(x, y); if (currentRow) { if (self.rowObject.direction === 'down') { @@ -501,7 +500,6 @@ Drupal.tableDrag.prototype.dragRow = function (event, self) { else { self.rowObject.swap('before', currentRow, self); } - self.restripeTable(); } } @@ -858,16 +856,6 @@ Drupal.tableDrag.prototype.setScroll = function (scrollAmount) { }, this.scrollSettings.interval); }; -Drupal.tableDrag.prototype.restripeTable = function () { - // :even and :odd are reversed because jQuery counts from 0 and - // we count from 1, so we're out of sync. - // Match immediate children of the parent element to allow nesting. - $(this.table).find('> tbody > tr.draggable:visible, > tr.draggable:visible') - .removeClass('odd even') - .filter(':odd').addClass('even').end() - .filter(':even').addClass('odd'); -}; - /** * Stub function. Allows a custom handler when a row begins dragging. */ diff --git a/core/modules/block/block-admin-display-form.tpl.php b/core/modules/block/block-admin-display-form.tpl.php index 1728273..8cc0151 100644 --- a/core/modules/block/block-admin-display-form.tpl.php +++ b/core/modules/block/block-admin-display-form.tpl.php @@ -44,7 +44,7 @@ $data): ?> - + block_title; ?> region_select; ?> weight_select; ?> diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 50bae76..65ec708 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -985,15 +985,7 @@ function block_rebuild() { * @see block.tpl.php */ function template_preprocess_block(&$variables) { - $block_counter = &drupal_static(__FUNCTION__, array()); $variables['block'] = $variables['elements']['#block']; - // All blocks get an independent counter for each region. - if (!isset($block_counter[$variables['block']->region])) { - $block_counter[$variables['block']->region] = 1; - } - // Same with zebra striping. - $variables['block_zebra'] = ($block_counter[$variables['block']->region] % 2) ? 'odd' : 'even'; - $variables['block_id'] = $block_counter[$variables['block']->region]++; // Create the $content variable that templates expect. $variables['content'] = $variables['elements']['#children']; diff --git a/core/modules/block/block.tpl.php b/core/modules/block/block.tpl.php index 78387a8..c74f85e 100644 --- a/core/modules/block/block.tpl.php +++ b/core/modules/block/block.tpl.php @@ -28,10 +28,6 @@ * Helper variables: * - $classes_array: Array of html class attribute values. It is flattened * into a string within the variable $classes. - * - $block_zebra: Outputs 'odd' and 'even' dependent on each block region. - * - $zebra: Same output as $block_zebra but independent of any block region. - * - $block_id: Counter dependent on each block region. - * - $id: Same output as $block_id but independent of any block region. * - $is_front: Flags true when presented in the front page. * - $logged_in: Flags true when the current user is a logged-in member. * - $is_admin: Flags true when the current user is an administrator. diff --git a/core/modules/field/field.module b/core/modules/field/field.module index ce2e214..37e91aa 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -1192,8 +1192,7 @@ function theme_field($variables) { // Render the items. $output .= '
    '; foreach ($variables['items'] as $delta => $item) { - $classes = 'field-item ' . ($delta % 2 ? 'odd' : 'even'); - $output .= '
    ' . drupal_render($item) . '
    '; + $output .= '
    ' . drupal_render($item) . '
    '; } $output .= '
    '; diff --git a/core/modules/field/theme/field.tpl.php b/core/modules/field/theme/field.tpl.php index c496908..99a1b13 100644 --- a/core/modules/field/theme/field.tpl.php +++ b/core/modules/field/theme/field.tpl.php @@ -54,7 +54,7 @@ HTML comment.
    > $item): ?> -
    >
    +
    >
    diff --git a/core/modules/filter/filter.admin.js b/core/modules/filter/filter.admin.js index b002041..d2b5699 100644 --- a/core/modules/filter/filter.admin.js +++ b/core/modules/filter/filter.admin.js @@ -27,8 +27,6 @@ Drupal.behaviors.filterStatus = { tab.tabHide().updateSummary(); } } - // Restripe table after toggling visibility of table row. - Drupal.tableDrag['filter-order'].restripeTable(); }); // Attach summary for configurable filters (only for screen-readers). diff --git a/core/modules/forum/forum-list.tpl.php b/core/modules/forum/forum-list.tpl.php index 01c74a3..4b1b0f4 100644 --- a/core/modules/forum/forum-list.tpl.php +++ b/core/modules/forum/forum-list.tpl.php @@ -11,7 +11,6 @@ * - $forum->is_container: TRUE if the forum can contain other forums. FALSE * if the forum can contain only topics. * - $forum->depth: How deep the forum is in the current hierarchy. - * - $forum->zebra: 'even' or 'odd' string used for row class. * - $forum->icon_class: 'default' or 'new' string used for forum icon class. * - $forum->icon_title: Text alternative for the forum icon. * - $forum->name: The name of the forum. @@ -44,7 +43,7 @@ $forum): ?> - + is_container ? 'colspan="4" class="container"' : 'class="forum"'; ?>> title: The title of the topic. Safe to output. * - $topic->message: If the topic has been moved, this contains an * explanation and a link. - * - $topic->zebra: 'even' or 'odd' string used for row class. * - $topic->comment_count: The number of replies on this topic. * - $topic->new_replies: A flag to indicate whether there are unread * comments. @@ -43,7 +42,7 @@ - + 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/shortcut/shortcut.admin.js b/core/modules/shortcut/shortcut.admin.js index dacae3e..04277df 100644 --- a/core/modules/shortcut/shortcut.admin.js +++ b/core/modules/shortcut/shortcut.admin.js @@ -16,14 +16,6 @@ Drupal.behaviors.shortcutDrag = { slots = 0, tableDrag = Drupal.tableDrag.shortcuts; table.find('> tbody > tr, > tr') - .filter(':visible') - .filter(':odd').filter('.odd') - .removeClass('odd').addClass('even') - .end().end() - .filter(':even').filter('.even') - .removeClass('even').addClass('odd') - .end().end() - .end() .filter('.shortcut-slot-empty').each(function(index) { if ($(this).is(':visible')) { visibleLength++; @@ -86,18 +78,6 @@ Drupal.behaviors.shortcutDrag = { var statusField = $rowElement.find('select.shortcut-status-select'); statusField.val(statusName); }; - - tableDrag.restripeTable = function () { - // :even and :odd are reversed because jQuery counts from 0 and - // we count from 1, so we're out of sync. - // Match immediate children of the parent element to allow nesting. - $(this.table).find('> tbody > tr:visible, > tr:visible') - .filter(':odd').filter('.odd') - .removeClass('odd').addClass('even') - .end().end() - .filter(':even').filter('.even') - .removeClass('even').addClass('odd'); - }; } } }; 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 = '
    '; $expected = '
    '; $expected .= '

    Some title

    '; $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' => '
    text to be removed
    ', ); - // 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..270a8bb 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 { +#footer li:last-child a { padding-right: 0; /* LTR */ border-right: none; /* 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..78d909f 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 { +tr.zebra { border-width: 0 1px 0 1px; border-style: solid; border-color: #bebfb9; background: #f3f4ee; } -tr.odd { +tr.zebra:nth-child(odd) { background: #fff; } tr.drag {