Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
Herst edited this page Aug 18, 2019 · 3 revisions

Note: This check has been removed in Bootlint v1.x.


E016

.btn.dropdown-toggle must be the last button in a button group.

Due to current limitations, for proper rendering, the dropdown toggle button in a split button dropdown must be the last button in the .btn-group.

Wrong:

<div class="btn-group">
  <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">
    <span class="caret"></span>
    <span class="sr-only">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu" role="menu">
    <li><a href="#">Action</a></li>
    <li><a href="#">Another action</a></li>
    <li><a href="#">Something else here</a></li>
    <li class="divider"></li>
    <li><a href="#">Separated link</a></li>
  </ul>
  <button type="button" class="btn btn-danger">Action</button>
</div>

Right:

<div class="btn-group">
  <button type="button" class="btn btn-danger">Action</button>
  <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">
    <span class="caret"></span>
    <span class="sr-only">Toggle Dropdown</span>
  </button>
  <ul class="dropdown-menu" role="menu">
    <li><a href="#">Action</a></li>
    <li><a href="#">Another action</a></li>
    <li><a href="#">Something else here</a></li>
    <li class="divider"></li>
    <li><a href="#">Separated link</a></li>
  </ul>
</div>
Clone this wiki locally