Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
665de045
Commit
665de045
authored
Jan 18, 2013
by
Vickash Mahabir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change .badge to .counter, make appearance more OSX-ish, and remove colors
parent
f068cdeb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
132 deletions
+32
-132
docs/assets/css/bootstrap.css
docs/assets/css/bootstrap.css
+9
-31
docs/components.html
docs/components.html
+7
-40
docs/templates/pages/components.mustache
docs/templates/pages/components.mustache
+7
-40
less/bootstrap.less
less/bootstrap.less
+1
-1
less/counters.less
less/counters.less
+8
-20
No files found.
docs/assets/css/bootstrap.css
View file @
665de045
...
@@ -3991,60 +3991,38 @@ a.thumbnail:hover {
...
@@ -3991,60 +3991,38 @@ a.thumbnail:hover {
list-style
:
none
;
list-style
:
none
;
}
}
.
badge
{
.
counter
{
display
:
inline-block
;
display
:
inline-block
;
padding
:
2px
4px
;
min-width
:
10px
;
padding
:
2px
7px
;
font-size
:
11.844px
;
font-size
:
11.844px
;
font-weight
:
bold
;
font-weight
:
bold
;
line-height
:
14px
;
line-height
:
14px
;
color
:
#fff
;
color
:
#fff
;
text-align
:
center
;
text-shadow
:
0
-1px
0
rgba
(
0
,
0
,
0
,
0.25
);
text-shadow
:
0
-1px
0
rgba
(
0
,
0
,
0
,
0.25
);
white-space
:
nowrap
;
white-space
:
nowrap
;
vertical-align
:
baseline
;
vertical-align
:
baseline
;
background-color
:
#999999
;
background-color
:
#999999
;
border-radius
:
3
px
;
border-radius
:
10
px
;
}
}
.
badge
:empty
{
.
counter
:empty
{
display
:
none
;
display
:
none
;
}
}
a
.
badge
:hover
{
a
.
counter
:hover
{
color
:
#fff
;
color
:
#fff
;
text-decoration
:
none
;
text-decoration
:
none
;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.badge-danger
{
.btn
.counter
{
background-color
:
#b94a48
;
}
.badge-danger
[
href
]
{
background-color
:
#953b39
;
}
.badge-warning
{
background-color
:
#f89406
;
}
.badge-warning
[
href
]
{
background-color
:
#c67605
;
}
.badge-success
{
background-color
:
#468847
;
}
.badge-success
[
href
]
{
background-color
:
#356635
;
}
.btn
.badge
{
position
:
relative
;
position
:
relative
;
top
:
-1px
;
top
:
-1px
;
}
}
.btn-mini
.
badge
{
.btn-mini
.
counter
{
top
:
0
;
top
:
0
;
}
}
...
...
docs/components.html
View file @
665de045
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
<li><a
href=
"#navbar"
><i
class=
"glyphicon-chevron-right"
></i>
Navbar
</a></li>
<li><a
href=
"#navbar"
><i
class=
"glyphicon-chevron-right"
></i>
Navbar
</a></li>
<li><a
href=
"#breadcrumbs"
><i
class=
"glyphicon-chevron-right"
></i>
Breadcrumbs
</a></li>
<li><a
href=
"#breadcrumbs"
><i
class=
"glyphicon-chevron-right"
></i>
Breadcrumbs
</a></li>
<li><a
href=
"#pagination"
><i
class=
"glyphicon-chevron-right"
></i>
Pagination
</a></li>
<li><a
href=
"#pagination"
><i
class=
"glyphicon-chevron-right"
></i>
Pagination
</a></li>
<li><a
href=
"#
badges"
><i
class=
"glyphicon-chevron-right"
></i>
Badge
s
</a></li>
<li><a
href=
"#
counters"
><i
class=
"glyphicon-chevron-right"
></i>
Counter
s
</a></li>
<li><a
href=
"#typography"
><i
class=
"glyphicon-chevron-right"
></i>
Typography
</a></li>
<li><a
href=
"#typography"
><i
class=
"glyphicon-chevron-right"
></i>
Typography
</a></li>
<li><a
href=
"#thumbnails"
><i
class=
"glyphicon-chevron-right"
></i>
Thumbnails
</a></li>
<li><a
href=
"#thumbnails"
><i
class=
"glyphicon-chevron-right"
></i>
Thumbnails
</a></li>
<li><a
href=
"#alerts"
><i
class=
"glyphicon-chevron-right"
></i>
Alerts
</a></li>
<li><a
href=
"#alerts"
><i
class=
"glyphicon-chevron-right"
></i>
Alerts
</a></li>
...
@@ -1333,11 +1333,11 @@
...
@@ -1333,11 +1333,11 @@
<!--
Badge
s
<!--
Counter
s
================================================== -->
================================================== -->
<section
id=
"
badge
s"
>
<section
id=
"
counter
s"
>
<div
class=
"page-header"
>
<div
class=
"page-header"
>
<h1>
Badge
s
</h1>
<h1>
Counter
s
</h1>
</div>
</div>
<table
class=
"table table-bordered table-striped"
>
<table
class=
"table table-bordered table-striped"
>
...
@@ -1354,50 +1354,17 @@
...
@@ -1354,50 +1354,17 @@
Default
Default
</td>
</td>
<td>
<td>
<span
class=
"
badge"
>
1
</span>
<span
class=
"
counter"
>
42
</span>
</td>
</td>
<td>
<td>
<code>
<
span class="badge"
>
1
<
/span
>
</code>
<code>
<
span class="counter"
>
42
<
/span
>
</code>
</td>
</tr>
<tr>
<td>
Success
</td>
<td>
<span
class=
"badge badge-success"
>
2
</span>
</td>
<td>
<code>
<
span class="badge badge-success"
>
2
<
/span
>
</code>
</td>
</tr>
<tr>
<td>
Warning
</td>
<td>
<span
class=
"badge badge-warning"
>
4
</span>
</td>
<td>
<code>
<
span class="badge badge-warning"
>
4
<
/span
>
</code>
</td>
</tr>
<tr>
<td>
Danger
</td>
<td>
<span
class=
"badge badge-danger"
>
6
</span>
</td>
<td>
<code>
<
span class="badge badge-danger"
>
6
<
/span
>
</code>
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<h3>
Easily collapsible
</h3>
<h3>
Easily collapsible
</h3>
<p>
For easy implementation,
badge
s will simply collapse (via CSS's
<code>
:empty
</code>
selector) when no content exists within.
</p>
<p>
For easy implementation,
counter
s will simply collapse (via CSS's
<code>
:empty
</code>
selector) when no content exists within.
</p>
</section>
</section>
...
...
docs/templates/pages/components.mustache
View file @
665de045
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<li><a
href=
"#navbar"
><i
class=
"glyphicon-chevron-right"
></i>
Navbar
</a></li>
<li><a
href=
"#navbar"
><i
class=
"glyphicon-chevron-right"
></i>
Navbar
</a></li>
<li><a
href=
"#breadcrumbs"
><i
class=
"glyphicon-chevron-right"
></i>
Breadcrumbs
</a></li>
<li><a
href=
"#breadcrumbs"
><i
class=
"glyphicon-chevron-right"
></i>
Breadcrumbs
</a></li>
<li><a
href=
"#pagination"
><i
class=
"glyphicon-chevron-right"
></i>
Pagination
</a></li>
<li><a
href=
"#pagination"
><i
class=
"glyphicon-chevron-right"
></i>
Pagination
</a></li>
<li><a
href=
"#
badges"
><i
class=
"glyphicon-chevron-right"
></i>
Badge
s
</a></li>
<li><a
href=
"#
counters"
><i
class=
"glyphicon-chevron-right"
></i>
Counter
s
</a></li>
<li><a
href=
"#typography"
><i
class=
"glyphicon-chevron-right"
></i>
Typography
</a></li>
<li><a
href=
"#typography"
><i
class=
"glyphicon-chevron-right"
></i>
Typography
</a></li>
<li><a
href=
"#thumbnails"
><i
class=
"glyphicon-chevron-right"
></i>
Thumbnails
</a></li>
<li><a
href=
"#thumbnails"
><i
class=
"glyphicon-chevron-right"
></i>
Thumbnails
</a></li>
<li><a
href=
"#alerts"
><i
class=
"glyphicon-chevron-right"
></i>
Alerts
</a></li>
<li><a
href=
"#alerts"
><i
class=
"glyphicon-chevron-right"
></i>
Alerts
</a></li>
...
@@ -1264,11 +1264,11 @@
...
@@ -1264,11 +1264,11 @@
<!--
Badge
s
<!--
Counter
s
================================================== -->
================================================== -->
<section
id=
"
badge
s"
>
<section
id=
"
counter
s"
>
<div
class=
"page-header"
>
<div
class=
"page-header"
>
<h1>
Badge
s
</h1>
<h1>
Counter
s
</h1>
</div>
</div>
<table
class=
"table table-bordered table-striped"
>
<table
class=
"table table-bordered table-striped"
>
...
@@ -1285,50 +1285,17 @@
...
@@ -1285,50 +1285,17 @@
Default
Default
</td>
</td>
<td>
<td>
<span
class=
"
badge"
>
1
</span>
<span
class=
"
counter"
>
42
</span>
</td>
</td>
<td>
<td>
<code>
<
span class="badge"
>
1
<
/span
>
</code>
<code>
<
span class="counter"
>
42
<
/span
>
</code>
</td>
</tr>
<tr>
<td>
Success
</td>
<td>
<span
class=
"badge badge-success"
>
2
</span>
</td>
<td>
<code>
<
span class="badge badge-success"
>
2
<
/span
>
</code>
</td>
</tr>
<tr>
<td>
Warning
</td>
<td>
<span
class=
"badge badge-warning"
>
4
</span>
</td>
<td>
<code>
<
span class="badge badge-warning"
>
4
<
/span
>
</code>
</td>
</tr>
<tr>
<td>
Danger
</td>
<td>
<span
class=
"badge badge-danger"
>
6
</span>
</td>
<td>
<code>
<
span class="badge badge-danger"
>
6
<
/span
>
</code>
</td>
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
<h3>
Easily collapsible
</h3>
<h3>
Easily collapsible
</h3>
<p>
For easy implementation,
badge
s will simply collapse (via CSS's
<code>
:empty
</code>
selector) when no content exists within.
</p>
<p>
For easy implementation,
counter
s will simply collapse (via CSS's
<code>
:empty
</code>
selector) when no content exists within.
</p>
</section>
</section>
...
...
less/bootstrap.less
View file @
665de045
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
@import "alerts.less";
@import "alerts.less";
@import "thumbnails.less";
@import "thumbnails.less";
@import "media.less";
@import "media.less";
@import "
badge
s.less";
@import "
counter
s.less";
@import "progress-bars.less";
@import "progress-bars.less";
@import "accordion.less";
@import "accordion.less";
@import "carousel.less";
@import "carousel.less";
...
...
less/
badge
s.less
→
less/
counter
s.less
View file @
665de045
...
@@ -4,9 +4,9 @@
...
@@ -4,9 +4,9 @@
// Base classes
// Base classes
.
badge
{
.
counter
{
display: inline-block;
display: inline-block;
padding: 2px
4
px;
padding: 2px
7
px;
font-size: @font-size-base * .846;
font-size: @font-size-base * .846;
font-weight: bold;
font-weight: bold;
line-height: 14px; // ensure proper line-height if floated
line-height: 14px; // ensure proper line-height if floated
...
@@ -15,7 +15,9 @@
...
@@ -15,7 +15,9 @@
white-space: nowrap;
white-space: nowrap;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
background-color: @grayLight;
background-color: @grayLight;
border-radius: 3px;
border-radius: 10px;
min-width: 10px;
text-align: center;
// Empty labels/badges collapse
// Empty labels/badges collapse
&:empty {
&:empty {
...
@@ -24,7 +26,7 @@
...
@@ -24,7 +26,7 @@
}
}
// Hover state, but only for links
// Hover state, but only for links
a.
badge
{
a.
counter
{
&:hover {
&:hover {
color: #fff;
color: #fff;
text-decoration: none;
text-decoration: none;
...
@@ -32,29 +34,15 @@ a.badge {
...
@@ -32,29 +34,15 @@ a.badge {
}
}
}
}
// 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
// Quick fix for labels/badges in buttons
.btn {
.btn {
.
badge
{
.
counter
{
position: relative;
position: relative;
top: -1px;
top: -1px;
}
}
}
}
.btn-mini {
.btn-mini {
.
badge
{
.
counter
{
top: 0;
top: 0;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment