twbs--bootstrap/scss/_tags.scss

78 lines
1.4 KiB
SCSS
Raw Normal View History

// Base class
//
// Requires one of the contextual, color modifier classes for `color` and
// `background-color`.
2015-04-18 18:38:47 +00:00
2016-02-11 08:54:30 +00:00
.tag {
display: inline-block;
padding: $tag-padding-y $tag-padding-x;
font-size: $tag-font-size;
2016-02-11 08:54:30 +00:00
font-weight: $tag-font-weight;
line-height: 1;
2016-02-11 08:54:30 +00:00
color: $tag-color;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
2014-12-02 22:02:35 +00:00
@include border-radius();
// Empty tags collapse automatically
&:empty {
display: none;
}
}
// Quick fix for tags in buttons
2016-02-11 08:54:30 +00:00
.btn .tag {
position: relative;
top: -1px;
2013-04-19 19:31:55 +00:00
}
2016-02-06 20:28:18 +00:00
// scss-lint:disable QualifyingElement
2014-12-02 22:02:35 +00:00
// Add hover effects, but only for links
2016-02-11 08:54:30 +00:00
a.tag {
@include hover-focus {
2016-02-11 08:54:30 +00:00
color: $tag-link-hover-color;
2014-12-02 22:02:35 +00:00
text-decoration: none;
cursor: pointer;
}
}
2016-02-06 20:28:18 +00:00
// scss-lint:enable QualifyingElement
2014-12-02 22:02:35 +00:00
// Pill tags
//
// Make them extra rounded with a modifier to replace v3's badges.
2016-02-11 08:54:30 +00:00
.tag-pill {
padding-right: $tag-pill-padding-x;
padding-left: $tag-pill-padding-x;
@include border-radius($tag-pill-border-radius);
}
// Colors
2015-04-18 18:38:47 +00:00
//
// Contextual variations (linked tags get darker on :hover).
2016-02-11 08:54:30 +00:00
.tag-default {
@include tag-variant($tag-default-bg);
}
2016-02-11 08:54:30 +00:00
.tag-primary {
@include tag-variant($tag-primary-bg);
2013-04-19 19:31:55 +00:00
}
2016-02-11 08:54:30 +00:00
.tag-success {
@include tag-variant($tag-success-bg);
2013-04-19 19:31:55 +00:00
}
2016-02-11 08:54:30 +00:00
.tag-info {
@include tag-variant($tag-info-bg);
}
2016-02-11 08:54:30 +00:00
.tag-warning {
@include tag-variant($tag-warning-bg);
}
2016-02-11 08:54:30 +00:00
.tag-danger {
@include tag-variant($tag-danger-bg);
2013-07-02 00:32:07 +00:00
}