discourse/app/assets/stylesheets/common/components/badges.css.scss

133 lines
2.4 KiB
SCSS
Raw Normal View History

2013-02-05 14:16:51 -05:00
// --------------------------------------------------
// Badges
// --------------------------------------------------
// Base
// --------------------------------------------------
%badge {
display: inline-block;
font-weight: normal;
2013-02-05 14:16:51 -05:00
white-space: nowrap;
2013-08-02 06:46:36 -04:00
@include border-radius-all(10px);
2013-02-05 14:16:51 -05:00
}
// Category badge
// --------------------------------------------------
.badge-category, .badge-category-parent {
font-size: 0.857em;
font-weight: bold;
white-space: nowrap;
display: inline-block;
line-height: 1;
2014-03-21 15:33:30 -04:00
}
.badge-wrapper {
white-space: nowrap;
}
.badge-category {
padding: 6px;
color: $secondary;
2013-02-05 14:16:51 -05:00
&[href] {
color: $secondary;
2013-02-05 14:16:51 -05:00
}
}
.badge-category-parent {
padding: 6px 2px;
width: 2px;
.category-name {
display: none;
}
&:before {
content: "\a0";
}
2013-02-05 14:16:51 -05:00
}
.d-dropdown .badge-category {
&.restricted {
div {
display: inline-block;
margin: 0;
}
}}
h1 a.badge-category div {vertical-align: top;}
2013-02-05 14:16:51 -05:00
// Notification badge
// --------------------------------------------------
.badge-notification {
@extend %badge;
2014-09-04 00:02:29 -04:00
padding: 3px 5px;
vertical-align: middle;
2014-07-25 23:06:14 -04:00
color: $secondary;
2013-02-05 14:16:51 -05:00
font-size: 11px;
2014-03-12 23:17:18 -04:00
line-height: 1;
2013-08-02 15:41:02 -04:00
text-align: center;
2014-07-25 23:06:14 -04:00
background-color: scale-color($primary, $lightness: 70%);
2013-02-05 14:16:51 -05:00
&[href] {
2014-07-25 23:06:14 -04:00
color: $secondary;
2013-02-05 14:16:51 -05:00
}
// New posts
2013-02-05 14:16:51 -05:00
&.new-posts, &.unread-posts {
2014-07-25 23:06:14 -04:00
background-color: scale-color($tertiary, $lightness: 50%);
color: $secondary;
font-weight: normal;
2013-02-05 14:16:51 -05:00
}
&.new-topic {
background-color: transparent;
2014-09-03 16:33:56 -04:00
color: scale-color($tertiary, $lightness: 20%);
font-weight: normal;
font-size: 0.929em;
}
2014-09-03 16:33:56 -04:00
&.new-topic::before {
2014-09-03 21:07:15 -04:00
content: "";
margin-right: 2px;
2014-09-03 16:33:56 -04:00
}
2013-02-05 14:16:51 -05:00
// Click count
&.clicks {
font-weight: normal;
background-color: #ddd;
top: -1px;
2013-11-17 22:32:58 -05:00
color: #888;
position: relative;
margin-left: 2px;
2014-07-25 12:22:55 -04:00
border: none;
2013-02-05 14:16:51 -05:00
}
}
// Posts badge
// --------------------------------------------------
.badge-posts {
font-weight: normal;
font-size: 1em;
2013-02-05 14:16:51 -05:00
line-height: 1;
&[href] {
color: scale-color($primary, $lightness: 40%);
2013-02-05 14:16:51 -05:00
}
}
// Group badge
// --------------------------------------------------
.badge-group {
@extend %badge;
padding: 3px 5px;
color: $primary;
text-shadow: 0 1px 0 rgba($primary, 0.1);
2014-08-06 09:31:13 -04:00
background-color: dark-light-diff($primary, $secondary, 90%, -65%);
border-color: dark-light-diff($primary, $secondary, 90%, -65%);
font-size: 0.857em;
box-shadow: inset 0 1px 0 rgba(0,0,0, 0.22);
}