mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 16:44:17 +02:00
Fixes #5775: Collapse labels/badges
* When :empty, display: none; * Add documentation for change in behavior
This commit is contained in:
5
docs/assets/css/bootstrap.css
vendored
5
docs/assets/css/bootstrap.css
vendored
@@ -5427,6 +5427,11 @@ a.thumbnail:hover {
|
|||||||
border-radius: 9px;
|
border-radius: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.label:empty,
|
||||||
|
.badge:empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
a.label:hover,
|
a.label:hover,
|
||||||
a.badge:hover {
|
a.badge:hover {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
@@ -1859,6 +1859,9 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</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>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
3
docs/templates/pages/components.mustache
vendored
3
docs/templates/pages/components.mustache
vendored
@@ -1788,6 +1788,9 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</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>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -27,6 +27,14 @@
|
|||||||
.border-radius(9px);
|
.border-radius(9px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Empty labels/badges collapse
|
||||||
|
.label,
|
||||||
|
.badge {
|
||||||
|
&:empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Hover state, but only for links
|
// Hover state, but only for links
|
||||||
a {
|
a {
|
||||||
&.label:hover,
|
&.label:hover,
|
||||||
|
Reference in New Issue
Block a user