Twitter Bootstrap 3.0 how do I “badge badge-important” now

后端 未结 9 1760
执念已碎
执念已碎 2021-01-29 19:01

In version two I could use

badge badge-important

I see that the .badge element no longer has contextual (-success,-primary,etc..) c

9条回答
  •  孤街浪徒
    2021-01-29 19:54

    When using the LESS version you can import mixins.less and create your own classes for colored badges:

    .badge-warning {
        .label-variant(@label-warning-bg);
    }
    

    Same for the other colors; just replace warning with danger, success, etc.

提交回复
热议问题