diff --git a/core/includes/theme.inc b/core/includes/theme.inc index d14f7f8..e0fda27 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1817,7 +1817,6 @@ function template_preprocess_item_list(&$variables) { * - items: A list of items to render. Allowed values are strings or * render arrays. Render arrays can specify list item attributes in the * #wrapper_attributes property. - * - title: The title of the list. * - list_type: The type of HTML list (e.g. "ul", "ol"). * - attributes: The attributes applied to the list element. * - empty: A message to display when there are no items. Allowed value is a @@ -1825,23 +1824,23 @@ function template_preprocess_item_list(&$variables) { */ function theme_item_list($variables) { $items = $variables['items']; - $title = (string) $variables['title']; $list_type = $variables['list_type']; - $list_attributes = $variables['attributes']; + $attributes = $variables['attributes']; + $attributes['class'][] = 'item-list'; $output = ''; if ($items) { - $output .= '<' . $list_type . new Attribute($list_attributes) . '>'; + $output .= '<' . $list_type . new Attribute($attributes) . '>'; foreach ($items as &$item) { - $attributes = array(); + $item_attributes = array(); if (is_array($item)) { if (isset($item['#wrapper_attributes'])) { - $attributes = $item['#wrapper_attributes']; + $item_attributes = $item['#wrapper_attributes']; } $item = drupal_render($item); } - $output .= '' . $item . ''; + $output .= '' . $item . ''; } $output .= ""; } @@ -1849,16 +1848,6 @@ function theme_item_list($variables) { $output .= render($variables['empty']); } - // Only output the list container and title, if there are any list items. - // Check to see whether the block title exists before adding a header. - // Empty headers are not semantic and present accessibility challenges. - if ($output !== '') { - if ($title !== '') { - $title = '

' . $title . '

'; - } - $output = '
' . $title . $output . '
'; - } - return $output; } diff --git a/core/modules/simpletest/css/simpletest.module.css b/core/modules/simpletest/css/simpletest.module.css index 86bd04b..d3a8afe 100644 --- a/core/modules/simpletest/css/simpletest.module.css +++ b/core/modules/simpletest/css/simpletest.module.css @@ -35,7 +35,7 @@ table#simpletest-form-table tr.simpletest-group label { display: inline; } -div.message > div.item-list { +div.message > ul.item-list { font-weight: normal; } diff --git a/core/modules/system/css/system.theme.css b/core/modules/system/css/system.theme.css index 4e83886..23c68fe 100644 --- a/core/modules/system/css/system.theme.css +++ b/core/modules/system/css/system.theme.css @@ -26,18 +26,15 @@ td.active { /** * Markup generated by theme_item_list(). */ -.item-list .title { - font-weight: bold; -} -.item-list ul { +ul.item-list { margin: 0 0 0.75em 0; padding: 0; } -.item-list ul li { +ul.item-list li { margin: 0 0 0.25em 1.5em; /* LTR */ padding: 0; } -[dir="rtl"] .item-list ul li { +[dir="rtl"] ul.item-list li { margin: 0 1.5em 0.25em 0; } @@ -149,11 +146,11 @@ abbr.form-required, abbr.tabledrag-changed, abbr.ajax-changed { /** * Markup generated by pager.html.twig. */ -.item-list .pager { +ul.pager { clear: both; text-align: center; } -.item-list .pager li { +ul.pager li { background-image: none; display: inline; list-style-type: none; 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 0ae413f..194c53b 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Theme/FunctionsTest.php @@ -118,32 +118,30 @@ function testItemList() { 'f', ); - $inner_b = '
    '; + $inner_b = '
      '; $inner_b .= '
    1. ba
    2. '; $inner_b .= '
    3. bb
    4. '; - $inner_b .= '
'; + $inner_b .= ''; - $inner_cb = '
    '; + $inner_cb = '
      '; $inner_cb .= '
    • cba
    • '; $inner_cb .= '
    • cbb
    • '; - $inner_cb .= '
'; + $inner_cb .= ''; - $inner_c = '
    '; + $inner_c = '
      '; $inner_c .= '
    • ca
    • '; $inner_c .= '
    • cb' . $inner_cb . '
    • '; $inner_c .= '
    • cc
    • '; - $inner_c .= '
'; + $inner_c .= ''; - $expected = '
'; - $expected .= '

Some title

'; - $expected .= '
    '; + $expected .= '
      '; $expected .= '
    • a
    • '; $expected .= '
    • b' . $inner_b . '
    • '; $expected .= '
    • c' . $inner_c . '
    • '; $expected .= '
    • d
    • '; $expected .= '
    • '; $expected .= '
    • f
    • '; - $expected .= '
'; + $expected .= ''; $this->assertThemeOutput('item_list', $variables, $expected); } diff --git a/core/modules/views/templates/views-view-summary.html.twig b/core/modules/views/templates/views-view-summary.html.twig index 4d8ed8f..adf6c16 100644 --- a/core/modules/views/templates/views-view-summary.html.twig +++ b/core/modules/views/templates/views-view-summary.html.twig @@ -19,14 +19,12 @@ * @ingroup themeable */ #} -
-
    - {% for row in rows %} -
  • {{ row.link }} - {% if options.count %} - ({{ row.count }}) - {% endif %} -
  • - {% endfor %} -
-
+ 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 0a4aa70..45ea369 100644 --- a/core/modules/views_ui/css/views_ui.admin.theme.css +++ b/core/modules/views_ui/css/views_ui.admin.theme.css @@ -1038,11 +1038,11 @@ ul#views-display-menu-tabs li.add ul.action-list li{ /* @group HTML list */ -#views-live-preview .view-content > .item-list > ul { +#views-live-preview .view-content > ul.item-list { list-style-position: outside; padding-left: 21px; /* LTR */ } -[dir="rtl"] #views-live-preview .view-content > .item-list > ul { +[dir="rtl"] #views-live-preview .view-content > ul.item-list { padding-left: 0; padding-right: 21px; } diff --git a/core/themes/bartik/css/style.css b/core/themes/bartik/css/style.css index ab61506..fab1afe 100644 --- a/core/themes/bartik/css/style.css +++ b/core/themes/bartik/css/style.css @@ -118,7 +118,7 @@ body, ul.contextual-links, ul.links, ul.primary, -.item-list .pager, +.pager, div.field-type-taxonomy-term-reference, div.messages, div.meta, @@ -265,27 +265,27 @@ table ul.links li { font-size: 0.923em; text-shadow: 0 0 0 !important; } -.item-list .pager { +.pager { font-size: 0.929em; } -.item-list .pager li { +.pager li { padding: 0; } -.item-list .pager a { +.pager a { display: inline-block; padding: 10px 15px; } -.item-list .pager .pager-first a { +.pager .pager-first a { padding: 10px 10px 10px 0; } -.item-list .pager .pager-previous a { +.pager .pager-previous a { padding: 10px 0; } -.item-list .pager .pager-current { +.pager .pager-current { padding: 0 10px; } -.item-list .pager .pager-next a, -.item-list .pager .pager-last a { +.pager .pager-next a, +.pager .pager-last a { padding: 10px 0 10px 10px; } ul.menu li { @@ -300,11 +300,11 @@ ul.menu li { [dir="rtl"] .region-content ol { padding: 2.5em 0 0.25em 0; } -.item-list ul li { +ul.item-list li { margin: 0; padding: 0.2em 0.5em 0 0; /* LTR */ } -[dir="rtl"] .item-list ul li { +[dir="rtl"] ul.item-list li { padding: 0.2em 0 0 0.5em; } ul.tips { @@ -461,21 +461,19 @@ h1#site-name { margin: 0; padding: 0; } -.region-header #block-user-login div.item-list, +.region-header #block-user-login ul.item-list, .region-header #block-user-login div.description { font-size: 0.916em; margin: 0; } -.region-header #block-user-login div.item-list { +.region-header #block-user-login ul.item-list { clear: both; + padding: 0; + line-height: 1; } .region-header #block-user-login div.description { display: inline; } -.region-header #block-user-login .item-list ul { - padding: 0; - line-height: 1; -} .region-header #block-user-login .item-list li { list-style: none; float: left; /* LTR */ diff --git a/core/themes/seven/style.css b/core/themes/seven/style.css index 09645c8..17fec68 100644 --- a/core/themes/seven/style.css +++ b/core/themes/seven/style.css @@ -1,15 +1,123 @@ /** - * Menus and lists. + * Generic elements. */ -.item-list ul { +body { + color: #000; + background: #fff; + font: normal 81.3%/1.538em "Lucida Grande", "Lucida Sans Unicode", sans-serif; +} +a, +.link { + color: #0074bd; + text-decoration: none; +} +a:hover, +.link:hover { + text-decoration: underline; +} +hr { + margin: 0; + padding: 0; + border: none; + height: 1px; + background: #cccccc; +} +summary, +legend { + font-weight: bold; + text-transform: uppercase; +} +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: bold; + margin: 10px 0; +} +h1 { + font-size: 1.538em; +} +h2 { + font-size: 1.385em; +} +h3 { + font-size: 1.231em; +} +h4 { + font-size: 1.154em; +} +h5, +h6 { + font-size: 1.077em; +} +p { + margin: 1em 0; +} +dl { + margin: 0 0 20px; +} +dl dd, +dl dl { + margin-left: 20px; /* LTR */ + margin-bottom: 10px; +} +[dir="rtl"] dl dd, +[dir="rtl"] dl dl { + margin-right: 20px; +} +blockquote { + margin: 1em 40px; +} +address { + font-style: italic; +} +u, +ins { + text-decoration: underline; +} +s, +strike, +del { + text-decoration: line-through; +} +big { + font-size: larger; +} +small { + font-size: smaller; +} +sub { + vertical-align: sub; + font-size: smaller; + line-height: normal; +} +sup { + vertical-align: super; + font-size: smaller; + line-height: normal; +} +nobr { + white-space: nowrap; +} +abbr, +acronym { + border-bottom: dotted 1px; +} +.pager li { + padding: 0.5em; +} +ul { list-style-type: disc; list-style-image: none; margin: 0.25em 0 0.25em 1.5em; /* LTR */ } -[dir="rtl"] .item-list ul { +[dir="rtl"] ul { margin: 0.25em 1.5em 0.25em 0; } .item-list ul li, +ul.item-list li, li.leaf, ul.menu li { list-style-type: disc; @@ -18,12 +126,19 @@ ul.menu li { ul.menu li { margin: 0; } -.item-list ul li.collapsed, +ol { + list-style-type: decimal; + margin: 0.25em 0 0.25em 2em; /* LTR */ +} +[dir="rtl"] ol { + margin: 0.25em 2em 0.25em 0; +} +ul.item-list li.collapsed, ul.menu li.collapsed { list-style-image: url(../../misc/menu-collapsed.png); list-style-type: disc; } -.item-list ul li.expanded, +ul.item-list li.expanded, ul.menu li.expanded { list-style-image: url(../../misc/menu-expanded.png); list-style-type: circle; @@ -1150,7 +1265,7 @@ details.fieldset-no-legend { /* @group Lists */ .views-admin ul.secondary, -.views-admin .item-list ul { +.views-admin ul.item-list { margin: 0; padding: 0; }