0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

Fixes #5775: Collapse labels/badges

* When :empty, display: none;
* Add documentation for change in behavior
This commit is contained in:
Mark Otto 2012-11-03 13:18:23 -07:00
parent fc42ac6a56
commit ead5dbeba5
4 changed files with 19 additions and 0 deletions

View File

@ -5427,6 +5427,11 @@ a.thumbnail:hover {
border-radius: 9px;
}
.label:empty,
.badge:empty {
display: none;
}
a.label:hover,
a.badge:hover {
color: #ffffff;

View File

@ -1859,6 +1859,9 @@
</tbody>
</table>
<h3>Easily collapsible</h3>
<p>For easy implementation, labels and badges will simply collapse (via CSS's <code>:empty</code> selector) when no content exists within.</p>
</section>

View File

@ -1788,6 +1788,9 @@
</tbody>
</table>
<h3>{{_i}}Easily collapsible{{/i}}</h3>
<p>{{_i}}For easy implementation, labels and badges will simply collapse (via CSS's <code>:empty</code> selector) when no content exists within.{{/i}}</p>
</section>

View File

@ -27,6 +27,14 @@
.border-radius(9px);
}
// Empty labels/badges collapse
.label,
.badge {
&:empty {
display: none;
}
}
// Hover state, but only for links
a {
&.label:hover,