seyhunak / twitter-bootstrap-rails

Twitter Bootstrap for Rails 6.0, Rails 5 - Rails 4.x Asset Pipeline
https://github.com/seyhunak/twitter-bootstrap-rails
4.49k stars 997 forks source link

The .badge-* classes have been removed. #769

Closed RyoYamamotoJP closed 10 years ago

RyoYamamotoJP commented 10 years ago

The following example is not working any more. The badge is not colorized.

<%= badge(12, :warning) %> <span class="badge badge-warning">12</span>
toadkicker commented 10 years ago

Is this with static css or less?

toadkicker commented 10 years ago

Put it in quotes: badge('12', :warning)

RyoYamamotoJP commented 10 years ago
<span class="badge badge-success">12</span>
<span class="badge badge-warning">12</span>
<span class="badge badge-important">12</span>
<span class="badge badge-info">12</span>
<span class="badge badge-inverse">12</span>

look the same as

<span class="badge">12</span>

Badges no longer have modifier classes and are purely meant as unread counters in Bootstrap 3.

toadkicker commented 10 years ago

That is true but users may want to add their own classes.

RyoYamamotoJP commented 10 years ago

Oh, I see.

Thank you for your comments.

toadkicker commented 10 years ago

Additionally I added an rspec test to check that a number can be passed into the badge class successfully. Thanks for pointing this out! I agree with you that it should take a number or a string as the first param.