// -------------------------------------------------- // Badges // -------------------------------------------------- // Base // -------------------------------------------------- %badge { display: inline-block; font-weight: normal; white-space: nowrap; @include border-radius-all(10px); } // Category badge // -------------------------------------------------- .badge-wrapper span { font-size: 0.857em; font-weight: bold; white-space: nowrap; display: inline-block; line-height: 1; position: relative; } .badge-wrapper { white-space: nowrap; position: relative; display: inline-block; } .badge-category { padding: 6px 4px; overflow: hidden; text-overflow: ellipsis; vertical-align: top; } .badge-wrapper > .badge-category { // ie9? width: 100%; width: calc(100% - 10px) } .d-header li.category .badge-wrapper { max-width: calc(100% - 30px) } h3 .badge-category { padding-left: 3px; } h3 .badge-wrapper { padding-left: 4px; } .title-wrapper .badge-category-bg { vertical-align: top; padding-top:0; padding-bottom:0; } .badge-category-parent-bg, .badge-category-bg { padding: 6px 2px; width: 2px; .category-name { display: none; } &:before { content: "\a0"; } } .d-dropdown .badge-category { &.restricted { span { display: inline-block; margin: 0; } }} h1 a.badge-category div {vertical-align: top;} .category-breadcrumb li > .badge-category { float: left; } // specific styles for badge categories .bar { .badge-category { color: $primary !important; } } .category-breadcrumb li.bar > .badge-category { background: dark-light-diff($primary, $secondary, 95%, -65%) !important; &:not(.home):first-child { border-left-width: 5px; border-left-style: solid; } } .badge-wrapper.box { .badge-category-bg { position: absolute; padding: 0; width: 100%; height: 100%; } } // Notification badge // -------------------------------------------------- .badge-notification { @extend %badge; padding: 3px 5px; vertical-align: middle; color: $secondary; font-size: 11px; line-height: 1; text-align: center; background-color: scale-color($primary, $lightness: 70%); &[href] { color: $secondary; } // New posts &.new-posts, &.unread-posts { background-color: scale-color($tertiary, $lightness: 50%); color: $secondary; font-weight: normal; } &.new-topic { background-color: transparent; color: scale-color($tertiary, $lightness: 20%); font-weight: normal; font-size: 0.929em; } &.new-topic::before { content: "●"; margin-right: 2px; } // Click count &.clicks { font-weight: normal; background-color: #ddd; top: -1px; color: #888; position: relative; margin-left: 2px; border: none; } } // Posts badge // -------------------------------------------------- .badge-posts { font-weight: normal; font-size: 1em; line-height: 1; &[href] { color: scale-color($primary, $lightness: 40%); } } // Group badge // -------------------------------------------------- .badge-group { @extend %badge; padding: 3px 5px; color: $primary; text-shadow: 0 1px 0 rgba($primary, 0.1); 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); }