zui
Version:
一个基于 Bootstrap 深度定制开源前端实践方案,帮助你快速构建现代跨屏应用。
76 lines (61 loc) • 1.92 kB
text/less
/// ========================================================================
/// Bootstrap: labels.less
/// https://github.com/twbs/bootstrap/blob/master/less/labels.less
/// https://github.com/twbs/bootstrap/blob/master/less/badges.less
///
/// ZUI: The file has been changed in ZUI. It will not keep update with the
/// Bootsrap version in the future.
/// http://openzui.com
/// ========================================================================
/// Bootrap: Copyright 2011-2016 Twitter, Inc. Licensed under MIT
/// ========================================================================
// Core style
.label {
display: inline;
padding: .2em .6em .2em;
font-size: @label-font-size;
line-height: 1;
color: @label-color;
text-align: center;
white-space: nowrap;
vertical-align: middle;
border-radius: .25em;
.label-variant(@label-default-bg);
// Add hover effects, but only for links
a& {
&:hover,
&:focus {
color: @label-link-hover-color;
text-decoration: none;
cursor: pointer;
}
}
// Empty labels collapse automatically (not available in IE8)
&:empty { display: none; }
}
// Badge
.label-badge {
display: inline-block;
border-radius: @badge-border-radius;
min-width: 18px;
padding: 3px 7px;
font-size: @font-size-small;
line-height: @badge-line-height;
}
.label-dot {
text-indent: -9999em;
display: inline-block;
padding: 0px;
border-radius: 50%;
width: @label-dot-size;
height: @label-dot-size;
line-height: @line-height-computed;
&:empty { display: inline-block; }
}
// Colors
// Contextual variations (linked labels get darker on :hover)
.label-primary { .label-variant(@label-primary-bg); }
.label-success { .label-variant(@label-success-bg); }
.label-info { .label-variant(@label-info-bg); }
.label-warning { .label-variant(@label-warning-bg); }
.label-danger { .label-variant(@label-danger-bg); }