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

115 lines
2.1 KiB
SCSS
Raw Normal View History

@import "common/foundation/variables";
@import "common/foundation/mixins";
2013-02-06 03:16:51 +08:00
// --------------------------------------------------
// Badges
// --------------------------------------------------
// Base
// --------------------------------------------------
%badge {
display: inline-block;
font-weight: normal;
2013-02-06 03:16:51 +08:00
white-space: nowrap;
2013-08-02 18:46:36 +08:00
@include border-radius-all(10px);
2013-02-06 03:16:51 +08:00
}
// Category badge
// --------------------------------------------------
.badge-category {
padding: 2px 4px;
color: $tertiary_text_color;
2013-02-06 03:16:51 +08:00
font-size: 12px;
font-weight: bold;
white-space: nowrap;
display: inline-block;
2013-02-06 03:16:51 +08:00
&[href] {
color: $tertiary_text_color;
2013-02-06 03:16:51 +08:00
}
&.restricted {
div {
display: inline-block;
margin: 0;
}
}
2013-02-06 03:16:51 +08:00
}
.d-dropdown .badge-category {
&.restricted {
div {
display: inline-block;
margin: 0;
padding-right: 6px;
}
}}
h1 a.badge-category div {vertical-align: top;}
2013-02-06 03:16:51 +08:00
// Notification badge
// --------------------------------------------------
.badge-notification {
@extend %badge;
2013-08-03 03:41:02 +08:00
padding: 4px;
color: $tertiary_text_color;
2013-02-06 03:16:51 +08:00
font-size: 11px;
2014-03-13 11:17:18 +08:00
line-height: 1;
min-width: 11px;
2013-08-03 03:41:02 +08:00
text-align: center;
2013-02-06 03:16:51 +08:00
background-color: $badge-notification-background-color;
&[href] {
color: $tertiary_text_color;
2013-02-06 03:16:51 +08:00
}
// New posts
2013-11-22 03:38:56 +08:00
&.new-posts, &.unread-posts {
2014-03-13 11:17:18 +08:00
background-color: lighten($emphasis_text_color, 20%);
color: $tertiary_text_color;
font-weight: normal;
2013-02-06 03:16:51 +08:00
}
2014-03-13 11:17:18 +08:00
2013-02-06 03:16:51 +08:00
// Click count
&.clicks {
font-weight: normal;
background-color: #ddd;
top: -1px;
2013-11-18 11:32:58 +08:00
color: #888;
position: relative;
margin-left: 2px;
2013-02-06 03:16:51 +08:00
}
}
// Posts badge
// --------------------------------------------------
.badge-posts {
color: $badge-posts-color;
font-weight: normal;
2013-02-06 03:16:51 +08:00
font-size: 14px;
line-height: 1;
&[href] {
color: $badge-posts-color;
}
}
// Group badge
// --------------------------------------------------
.badge-group {
@extend %badge;
padding: 3px 5px;
color: $primary_text_color;
text-shadow: 0 1px 0 rgba($secondary_shadow_color, 0.2);
background-color: #ddd;
border-color: #aaa;
font-size: 12px;
@include box-shadow(inset 0 1px 0 rgba($secondary_shadow_color, 0.52));
}