Bootstrap危险等级不适用于表格行

Hom*_*ith 7 css ruby-on-rails twitter-bootstrap

我的Rails应用程序中有以下表格:

<table class='table table-bordered table-hover table-striped'>
    <thead>
      <tr>
        <th>ID</th>
        <th>Status</th>
      </tr>
    </thead>

    <tbody>
      <tr class='danger'>
        <td><%= order.id %></td>
        <td><%= order.status.name %></td>
      </tr>
    </tbody>
  </table>
Run Code Online (Sandbox Code Playgroud)

类'危险'的行不会改变颜色.但是,如果我使用"成功"类,它会正确更改.

我正在使用twitter-bootstrap-rails gem.

Kir*_*rat 6

twitter-bootstrap宝石目前正在使用bootstrap v 2.3.2.

并且根据Bootstrap版本2.3.2下表中的文档是可用的行类:

Optional row classes

Use contextual classes to color table rows.

.success    Indicates a successful or positive action.
.error      Indicates a dangerous or potentially negative action.
.warning    Indicates a warning that might need attention.
.info       Used as an alternative to the default styles.
Run Code Online (Sandbox Code Playgroud)

这是为什么.success有效,但不是.danger.

我想你在找.error课.


fab*_*aby 6

它似乎是一个知道桌子的错误.

看起来这是v3.0.3中的一个已知错误,将在v3.1.0中修复

请参阅此错误错误页面和此堆栈问题