aboutsummaryrefslogtreecommitdiff
path: root/less/counters.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-01-19 17:06:40 -0800
committerMark Otto <[email protected]>2013-01-19 17:06:40 -0800
commitc21c3f101b334fb176b5fc4efd437b7da724e1fc (patch)
tree248b8cb9d1b5f7b8e9e7c27b9f4906bbac959dd2 /less/counters.less
parent64bc5dc91f2a0770d3d563c53600a82f92f53c0f (diff)
parent67ec13a44c945c61735882ce7e78174ea9e32d74 (diff)
downloadbootstrap-c21c3f101b334fb176b5fc4efd437b7da724e1fc.tar.xz
bootstrap-c21c3f101b334fb176b5fc4efd437b7da724e1fc.zip
Merge branch '3.0.0-wip-badges-to-counters' of https://github.com/vickash/bootstrap into vickash-3.0.0-wip-badges-to-counters
Diffstat (limited to 'less/counters.less')
-rw-r--r--less/counters.less48
1 files changed, 48 insertions, 0 deletions
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;
+ }
+}