Commit 0e6abffd authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2557367 by davidhernandez, joelpittet, madhavvyas, alexpott, nikkyR,...

Issue #2557367 by davidhernandez, joelpittet, madhavvyas, alexpott, nikkyR, Studiographene, emma.maria, xjm: Fix inline list CSS
parent c2af04eb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1049,6 +1049,7 @@ function template_preprocess_table(&$variables) {
 * @see https://www.drupal.org/node/1842756
 */
function template_preprocess_item_list(&$variables) {
  $variables['wrapper_attributes'] = new Attribute($variables['wrapper_attributes']);
  foreach ($variables['items'] as &$item) {
    $attributes = array();
    // If the item value is an array, then it is a render array.
@@ -1752,7 +1753,7 @@ function drupal_common_theme() {
      'variables' => array('status' => MARK_NEW),
    ),
    'item_list' => array(
      'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'attributes' => array(), 'empty' => NULL, 'context' => array()),
      'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'wrapper_attributes' => array(), 'attributes' => array(), 'empty' => NULL, 'context' => array()),
    ),
    'feed_icon' => array(
      'variables' => array('url' => NULL, 'title' => NULL),
+19 −0
Original line number Diff line number Diff line
/**
 * @file
 * Styles for item list.
 */

.item-list__comma-list,
.item-list__comma-list li {
  display: inline;
}
.item-list__comma-list {
  margin: 0;
  padding: 0;
}
.item-list__comma-list li:after {
  content: ", ";
}
.item-list__comma-list li:last-child:after {
  content: "";
}
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ base:
      css/components/clearfix.module.css: { weight: -10 }
      css/components/details.module.css: { weight: -10 }
      css/components/hidden.module.css: { weight: -10 }
      css/components/item-list.module.css: { weight: -10 }
      css/components/js.module.css: { weight: -10 }
      css/components/nowrap.module.css: { weight: -10 }
      css/components/position-container.module.css: { weight: -10 }
+3 −2
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@
 *   - value: The content of the list element.
 * - title: The title of the list.
 * - list_type: The tag for list element ("ul" or "ol").
 * - wrapper_attributes: HTML attributes to be applied to the list wrapper.
 * - attributes: HTML attributes to be applied to the list.
 * - empty: A message to display when there are no items. Allowed value is a
 *   string or render array.
@@ -21,9 +22,9 @@
 */
#}
{% if context.list_style %}
  {% set attributes = attributes.addClass('item-list__' ~ context.list_style) %}
  {%- set attributes = attributes.addClass('item-list__' ~ context.list_style) %}
{% endif %}
{%- if items or empty -%}
{% if items or empty %}
  {%- if title is not empty -%}
    <h3>{{ title }}</h3>
  {%- endif -%}
+0 −1
Original line number Diff line number Diff line
@@ -25,6 +25,5 @@
.item-list .item-list__comma-list li,
[dir="rtl"] .item-list .item-list__comma-list,
[dir="rtl"] .item-list .item-list__comma-list li {
  margin: 0;
  padding: 0;
}
Loading