0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-30 22:52:24 +01:00

Merge pull request #9123 from twbs/bs3_alerts_default_class

Update labels to include a base class (fixes #8752)
This commit is contained in:
Mark Otto 2013-08-05 20:01:45 -07:00
commit 1d1e21aff6
5 changed files with 25 additions and 13 deletions

View File

@ -1629,28 +1629,28 @@ body { padding-bottom: 70px; }
<h3>Example</h3> <h3>Example</h3>
<div class="bs-example"> <div class="bs-example">
<h1>Example heading <span class="label">New</span></h1> <h1>Example heading <span class="label label-default">New</span></h1>
<h2>Example heading <span class="label">New</span></h2> <h2>Example heading <span class="label label-default">New</span></h2>
<h3>Example heading <span class="label">New</span></h3> <h3>Example heading <span class="label label-default">New</span></h3>
<h4>Example heading <span class="label">New</span></h4> <h4>Example heading <span class="label label-default">New</span></h4>
<h5>Example heading <span class="label">New</span></h5> <h5>Example heading <span class="label label-default">New</span></h5>
<h6>Example heading <span class="label">New</span></h6> <h6>Example heading <span class="label label-default">New</span></h6>
</div> </div>
{% highlight html %} {% highlight html %}
<h3>Example heading <span class="label">New</span></h3> <h3>Example heading <span class="label label-default">New</span></h3>
{% endhighlight %} {% endhighlight %}
<h3>Available variations</h3> <h3>Available variations</h3>
<p>Add any of the below mentioned modifier classes to change the appearance of a label.</p> <p>Add any of the below mentioned modifier classes to change the appearance of a label.</p>
<div class="bs-example"> <div class="bs-example">
<span class="label">Default</span> <span class="label label-default">Default</span>
<span class="label label-success">Success</span> <span class="label label-success">Success</span>
<span class="label label-warning">Warning</span> <span class="label label-warning">Warning</span>
<span class="label label-danger">Danger</span> <span class="label label-danger">Danger</span>
<span class="label label-info">Info</span> <span class="label label-info">Info</span>
</div> </div>
{% highlight html %} {% highlight html %}
<span class="label">Default</span> <span class="label label-default">Default</span>
<span class="label label-success">Success</span> <span class="label label-success">Success</span>
<span class="label label-warning">Warning</span> <span class="label label-warning">Warning</span>
<span class="label label-danger">Danger</span> <span class="label label-danger">Danger</span>

View File

@ -4073,7 +4073,6 @@ a.thumbnail:focus {
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: baseline; vertical-align: baseline;
background-color: #999999;
border-radius: .25em; border-radius: .25em;
} }
@ -4082,6 +4081,14 @@ a.thumbnail:focus {
color: #ffffff; color: #ffffff;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
}
.label-default {
background-color: #999999;
}
.label-default[href]:hover,
.label-default[href]:focus {
background-color: #808080; background-color: #808080;
} }

File diff suppressed because one or more lines are too long

View File

@ -12,7 +12,6 @@
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: baseline; vertical-align: baseline;
background-color: @gray-light;
border-radius: .25em; border-radius: .25em;
// Add hover effects, but only for links // Add hover effects, but only for links
@ -22,13 +21,17 @@
color: @label-link-hover-color; color: @label-link-hover-color;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
background-color: darken(@gray-light, 10%);
} }
} }
} }
// Colors // Colors
// Contextual variations (linked labels get darker on :hover) // Contextual variations (linked labels get darker on :hover)
.label-default {
.label-variant(@label-default-bg);
}
.label-danger { .label-danger {
.label-variant(@label-danger-bg); .label-variant(@label-danger-bg);
} }

View File

@ -381,6 +381,8 @@
// Labels // Labels
// ------------------------- // -------------------------
@label-default-bg: @gray-light;
@label-success-bg: @brand-success; @label-success-bg: @brand-success;
@label-info-bg: @brand-info; @label-info-bg: @brand-info;
@label-warning-bg: @brand-warning; @label-warning-bg: @brand-warning;