From 665de0455cb433c9e3c3b6d6ad72318b46098650 Mon Sep 17 00:00:00 2001 From: Vickash Mahabir Date: Fri, 18 Jan 2013 17:35:23 -0400 Subject: Change .badge to .counter, make appearance more OSX-ish, and remove colors --- less/badges.less | 60 ----------------------------------------------------- less/bootstrap.less | 2 +- less/counters.less | 48 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 61 deletions(-) delete mode 100644 less/badges.less create mode 100644 less/counters.less (limited to 'less') diff --git a/less/badges.less b/less/badges.less deleted file mode 100644 index 5511bc81f..000000000 --- a/less/badges.less +++ /dev/null @@ -1,60 +0,0 @@ -// -// Labels and badges -// -------------------------------------------------- - - -// Base classes -.badge { - display: inline-block; - padding: 2px 4px; - font-size: @font-size-base * .846; - font-weight: bold; - line-height: 14px; // ensure proper line-height if floated - color: #fff; - vertical-align: baseline; - white-space: nowrap; - text-shadow: 0 -1px 0 rgba(0,0,0,.25); - background-color: @grayLight; - border-radius: 3px; - - // Empty labels/badges collapse - &:empty { - display: none; - } -} - -// Hover state, but only for links -a.badge { - &:hover { - color: #fff; - text-decoration: none; - cursor: pointer; - } -} - -// Colors -// Only give background-color difference to links (and to simplify, we don't qualifty with `a` but [href] attribute) -.badge { - // Important (red) - &-danger { background-color: @state-error-text; } - &-danger[href] { background-color: darken(@state-error-text, 10%); } - // Warnings (orange) - &-warning { background-color: #f89406; } - &-warning[href] { background-color: darken(#f89406, 10%); } - // Success (green) - &-success { background-color: @state-success-text; } - &-success[href] { background-color: darken(@state-success-text, 10%); } -} - -// Quick fix for labels/badges in buttons -.btn { - .badge { - position: relative; - top: -1px; - } -} -.btn-mini { - .badge { - top: 0; - } -} diff --git a/less/bootstrap.less b/less/bootstrap.less index d40984230..0a4dd9ca5 100644 --- a/less/bootstrap.less +++ b/less/bootstrap.less @@ -49,7 +49,7 @@ @import "alerts.less"; @import "thumbnails.less"; @import "media.less"; -@import "badges.less"; +@import "counters.less"; @import "progress-bars.less"; @import "accordion.less"; @import "carousel.less"; diff --git a/less/counters.less b/less/counters.less new file mode 100644 index 000000000..6f9cc00fc --- /dev/null +++ b/less/counters.less @@ -0,0 +1,48 @@ +// +// Labels and badges +// -------------------------------------------------- + + +// Base classes +.counter { + display: inline-block; + padding: 2px 7px; + font-size: @font-size-base * .846; + font-weight: bold; + line-height: 14px; // ensure proper line-height if floated + color: #fff; + vertical-align: baseline; + white-space: nowrap; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + background-color: @grayLight; + border-radius: 10px; + min-width: 10px; + text-align: center; + + // Empty labels/badges collapse + &:empty { + display: none; + } +} + +// Hover state, but only for links +a.counter { + &:hover { + color: #fff; + text-decoration: none; + cursor: pointer; + } +} + +// Quick fix for labels/badges in buttons +.btn { + .counter { + position: relative; + top: -1px; + } +} +.btn-mini { + .counter { + top: 0; + } +} -- cgit v1.2.3