<ul>
    <li>Item</li>
    <li>Item</li>
    <li>Item</li>
    <li>Item
        <ul>
            <li>Subitem</li>
            <li>Subitem</li>
            <li>Subitem</li>
        </ul>
    </li>
    <li>Item</li>
    <li>Item</li>
</ul>
<{{#if ordered}}ol{{else}}ul{{/if}}>
  {{#each items}}
  <li>{{ item.text }}
    {{~#if item.sublist~}}
    <{{#if item.sublist.ordered}}ol{{else}}ul{{/if}}>
      {{#each item.sublist.items}}
      <li>{{ item.text }}</li>
      {{/each}}
    </{{#if item.sublist.ordered}}ol{{else}}ul{{/if}}>
    {{/if}}</li>
  {{/each}}
</{{#if ordered}}ol{{else}}ul{{/if}}>
{
  "items": [
    {
      "item": {
        "text": "Item"
      }
    },
    {
      "item": {
        "text": "Item"
      }
    },
    {
      "item": {
        "text": "Item"
      }
    },
    {
      "item": {
        "text": "Item",
        "sublist": {
          "items": [
            {
              "item": {
                "text": "Subitem"
              }
            },
            {
              "item": {
                "text": "Subitem"
              }
            },
            {
              "item": {
                "text": "Subitem"
              }
            }
          ]
        }
      }
    },
    {
      "item": {
        "text": "Item"
      }
    },
    {
      "item": {
        "text": "Item"
      }
    }
  ]
}
  • Content:
    ol, ul {
      padding-left: 1.5em;
    }
    
    ol {
      list-style: decimal outside;
    
      ol {
        list-style: lower-alpha outside;
      }
    }
    
    li {
      margin-bottom: $line-height/2;
    
      > ol, ul {
        margin-top: $line-height/2;
        margin-bottom: $line-height/2;
      }
    }
  • URL: /components/raw/list/_sass.scss
  • Filesystem Path: components/01-elements/01-text/03-list/_sass.scss
  • Size: 247 Bytes

There are no notes for this item.