diff --git a/core/modules/simpletest/css/simpletest.module.css b/core/modules/simpletest/css/simpletest.module.css
index 71f7eea..4073c6f 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 > .item-list {
font-weight: normal;
}
diff --git a/core/modules/system/css/system.theme.css b/core/modules/system/css/system.theme.css
index 3e9180b..f8846e0 100644
--- a/core/modules/system/css/system.theme.css
+++ b/core/modules/system/css/system.theme.css
@@ -23,18 +23,18 @@ td.active {
/**
* Markup generated by theme_item_list().
*/
-.item-list .title {
- font-weight: bold;
-}
-.item-list ul {
+.item-list {
margin: 0 0 0.75em 0;
padding: 0;
}
-.item-list ul li {
+.item-list .title {
+ font-weight: bold;
+}
+.item-list li {
margin: 0 0 0.25em 1.5em; /* LTR */
padding: 0;
}
-[dir="rtl"] .item-list ul li {
+[dir="rtl"] .item-list li {
margin: 0 1.5em 0.25em 0;
}
diff --git a/core/modules/system/src/Tests/Theme/FunctionsTest.php b/core/modules/system/src/Tests/Theme/FunctionsTest.php
index c8d068c..992cf6f 100644
--- a/core/modules/system/src/Tests/Theme/FunctionsTest.php
+++ b/core/modules/system/src/Tests/Theme/FunctionsTest.php
@@ -44,21 +44,21 @@ function testItemList() {
// Verify that empty items produce the empty string.
$variables = array();
$variables['empty'] = 'No items found.';
- $expected = '
No items found.
';
+ $expected = 'No items found.';
$this->assertThemeOutput('item_list', $variables, $expected, 'Empty %callback generates empty string.');
// Verify that empty items produce the empty string with title.
$variables = array();
$variables['title'] = 'Some title';
$variables['empty'] = 'No items found.';
- $expected = 'Some title
No items found.';
+ $expected = 'Some title
No items found.';
$this->assertThemeOutput('item_list', $variables, $expected, 'Empty %callback generates empty string with title.');
// Verify that title set to 0 is output.
$variables = array();
$variables['title'] = 0;
$variables['empty'] = 'No items found.';
- $expected = '0
No items found.';
+ $expected = '0
No items found.';
$this->assertThemeOutput('item_list', $variables, $expected, '%callback with title set to 0 generates a title.');
// Verify that title set to a render array is output.
@@ -67,7 +67,7 @@ function testItemList() {
'#markup' => 'Render array',
);
$variables['empty'] = 'No items found.';
- $expected = 'Render array
No items found.';
+ $expected = 'Render array
No items found.';
$this->assertThemeOutput('item_list', $variables, $expected, '%callback with title set to a render array generates a title.');
// Verify that empty text is not displayed when there are list items.
@@ -75,7 +75,7 @@ function testItemList() {
$variables['title'] = 'Some title';
$variables['empty'] = 'No items found.';
$variables['items'] = array('Un', 'Deux', 'Trois');
- $expected = '';
+ $expected = 'Some title
';
$this->assertThemeOutput('item_list', $variables, $expected, '%callback does not print empty text when there are list items.');
// Verify nested item lists.
@@ -136,32 +136,31 @@ function testItemList() {
'f',
);
- $inner_b = '';
+ $inner_b = '';
$inner_b .= '- ba
';
$inner_b .= '- bb
';
- $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 = 'Some title
';
+ $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/system/templates/item-list.html.twig b/core/modules/system/templates/item-list.html.twig
index bd71e7f..ec323b2 100644
--- a/core/modules/system/templates/item-list.html.twig
+++ b/core/modules/system/templates/item-list.html.twig
@@ -19,18 +19,16 @@
*/
#}
{%- if items or empty -%}
-
- {%- if title is not empty -%}
-
{{ title }}
- {%- endif -%}
- {%- if items -%}
- <{{ list_type }}{{ attributes }}>
- {%- for item in items -%}
- {{ item.value }}
- {%- endfor -%}
- {{ list_type }}>
- {%- else -%}
- {{- empty -}}
- {%- endif -%}
-
+ {%- if title is not empty -%}
+ {{ title }}
+ {%- endif -%}
+ {%- if items -%}
+ <{{ list_type }}{{ attributes.addClass('item-list') }}>
+ {%- for item in items -%}
+ {{ item.value }}
+ {%- endfor -%}
+ {{ list_type }}>
+ {%- else -%}
+ {{- empty -}}
+ {%- endif -%}
{%- endif %}
diff --git a/core/modules/views/templates/views-view-summary.html.twig b/core/modules/views/templates/views-view-summary.html.twig
index 4d8ed8f..b2ee306 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 %}
-
-
+
+{% 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 47909d9..61987e3 100644
--- a/core/modules/views_ui/css/views_ui.admin.theme.css
+++ b/core/modules/views_ui/css/views_ui.admin.theme.css
@@ -1059,11 +1059,11 @@ td.group-title {
/* @group HTML list */
-#views-live-preview .view-content > .item-list > ul {
+#views-live-preview .view-content > .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 > .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 9deef51..81eb529 100644
--- a/core/themes/bartik/css/style.css
+++ b/core/themes/bartik/css/style.css
@@ -314,11 +314,11 @@ ul.menu li {
[dir="rtl"] .region-content ol {
padding: 0 15px 0.25em 0;
}
-.item-list ul li {
+.item-list li {
margin: 0;
padding: 0.2em 0.5em 0 0; /* LTR */
}
-[dir="rtl"] .item-list ul li {
+[dir="rtl"] .item-list li {
padding: 0.2em 0 0 0.5em;
}
ul.tips {
@@ -482,18 +482,18 @@ h1.site-name {
margin: 0;
padding: 0;
}
-.region-header #block-user-login div.item-list,
+.region-header #block-user-login .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 .item-list {
clear: both;
}
.region-header #block-user-login div.description {
display: inline;
}
-.region-header #block-user-login .item-list ul {
+.region-header #block-user-login .item-list {
padding: 0;
line-height: 1;
}
diff --git a/core/themes/seven/css/components/menus-and-lists.css b/core/themes/seven/css/components/menus-and-lists.css
index bd2d908..3944026 100644
--- a/core/themes/seven/css/components/menus-and-lists.css
+++ b/core/themes/seven/css/components/menus-and-lists.css
@@ -1,15 +1,15 @@
/**
* Menus and lists.
*/
-.item-list ul {
+.item-list {
list-style-type: disc;
list-style-image: none;
margin: 0.25em 0 0.25em 1.5em; /* LTR */
}
-[dir="rtl"] .item-list ul {
+[dir="rtl"] .item-list {
margin: 0.25em 1.5em 0.25em 0;
}
-.item-list ul li,
+.item-list li,
li.leaf,
ul.menu li {
list-style-type: disc;
@@ -18,12 +18,12 @@ ul.menu li {
ul.menu li {
margin: 0;
}
-.item-list ul li.collapsed,
+.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,
+.item-list li.expanded,
ul.menu li.expanded {
list-style-image: url(../../../../misc/menu-expanded.png);
list-style-type: circle;
diff --git a/core/themes/seven/css/components/views-ui.css b/core/themes/seven/css/components/views-ui.css
index ed33366..3f81948 100644
--- a/core/themes/seven/css/components/views-ui.css
+++ b/core/themes/seven/css/components/views-ui.css
@@ -94,7 +94,7 @@ details.fieldset-no-legend {
/* @group Lists */
.views-admin ul.secondary,
-.views-admin .item-list ul {
+.views-admin .item-list {
margin: 0;
padding: 0;
}