mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-20 20:00:36 +03:00
Badges, navs, and more
This commit is contained in:
Vendored
+18
-12
@@ -2988,7 +2988,8 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
|
|||||||
.nav > li > a {
|
.nav > li > a {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
padding: 10px 15px;
|
padding: .5em 1em;
|
||||||
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
.nav > li > a:hover,
|
.nav > li > a:hover,
|
||||||
.nav > li > a:focus {
|
.nav > li > a:focus {
|
||||||
@@ -3903,29 +3904,34 @@ a.label:focus {
|
|||||||
background-color: #c9302c;
|
background-color: #c9302c;
|
||||||
}
|
}
|
||||||
.badge {
|
.badge {
|
||||||
|
position: relative;
|
||||||
|
top: -.1em;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 10px;
|
padding-right: .6em;
|
||||||
padding: 3px 7px;
|
padding-left: .6em;
|
||||||
font-size: .85rem;
|
font-size: .75em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 1;
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
vertical-align: baseline;
|
|
||||||
background-color: #818a91;
|
background-color: #818a91;
|
||||||
border-radius: 10px;
|
border-radius: 2em;
|
||||||
|
/* .btn & {
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
.badge:empty {
|
.badge:empty {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.btn .badge {
|
.badge.pull-left,
|
||||||
position: relative;
|
.badge.pull-right {
|
||||||
top: -1px;
|
top: .2em;
|
||||||
}
|
}
|
||||||
.btn-xs .badge {
|
.btn-xs .badge {
|
||||||
top: 0;
|
/*top: 0;*/
|
||||||
padding: 1px 5px;
|
/*padding: 1px 5px;*/
|
||||||
}
|
}
|
||||||
a.badge:hover,
|
a.badge:hover,
|
||||||
a.badge:focus {
|
a.badge:focus {
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -43,9 +43,20 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<button class="btn btn-primary" type="button">
|
<p>
|
||||||
Messages <span class="badge">4</span>
|
<button class="btn btn-primary btn-lg" type="button">
|
||||||
</button>
|
Large button <span class="badge">4</span>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary" type="button">
|
||||||
|
Button <span class="badge">4</span>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary btn-sm" type="button">
|
||||||
|
Small button <span class="badge">4</span>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary btn-xs" type="button">
|
||||||
|
Extra small <span class="badge">4</span>
|
||||||
|
</button>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{% highlight html %}
|
{% highlight html %}
|
||||||
<ul class="nav nav-pills nav-stacked" role="tablist">
|
<ul class="nav nav-pills nav-stacked" role="tablist">
|
||||||
|
|||||||
@@ -949,32 +949,41 @@ h1[id] {
|
|||||||
|
|
||||||
.bs-example {
|
.bs-example {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-top: 3rem;
|
padding: 1.5rem;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
|
margin-bottom: -1rem;
|
||||||
|
border: solid #f7f7f9;
|
||||||
|
border-width: .2rem 0 0;
|
||||||
}
|
}
|
||||||
/* Echo out a label for the example */
|
/* Echo out a label for the example */
|
||||||
.bs-example:before {
|
.bs-example:before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
display: inline-block;
|
display: none;
|
||||||
padding: .5rem .75rem;
|
padding: .4rem .75rem;
|
||||||
font-size: .8rem;
|
font-size: .75rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: .1rem;
|
letter-spacing: .1rem;
|
||||||
content: "Example";
|
content: "Example";
|
||||||
background-color: #818a91;
|
background-color: #eb4c82;
|
||||||
border-radius: .2rem;
|
border-radius: .2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tweak display of the code snippets when following an example */
|
/* Tweak display of the code snippets when following an example */
|
||||||
.bs-example + .highlight:before {
|
.bs-example + .highlight:before {
|
||||||
position: absolute;
|
/* position: absolute;
|
||||||
width: 0;
|
width: 0;
|
||||||
height: 0;
|
height: 0;
|
||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
|
*/}
|
||||||
|
|
||||||
|
@media (min-width: 480px) {
|
||||||
|
.bs-example {
|
||||||
|
border-width: .2rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Undo width of container */
|
/* Undo width of container */
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
// }, 100)
|
// }, 100)
|
||||||
|
|
||||||
// theme toggler
|
// theme toggler
|
||||||
;(function () {
|
(function () {
|
||||||
var stylesheetLink = $('#bs-theme-stylesheet')
|
var stylesheetLink = $('#bs-theme-stylesheet')
|
||||||
var themeBtn = $('.bs-docs-theme-toggle')
|
var themeBtn = $('.bs-docs-theme-toggle')
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
localStorage.removeItem('previewTheme')
|
localStorage.removeItem('previewTheme')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})();
|
})
|
||||||
|
|
||||||
// Tooltip and popover demos
|
// Tooltip and popover demos
|
||||||
$('.tooltip-demo').tooltip({
|
$('.tooltip-demo').tooltip({
|
||||||
|
|||||||
Vendored
+18
-12
@@ -2988,7 +2988,8 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
|
|||||||
.nav > li > a {
|
.nav > li > a {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
padding: 10px 15px;
|
padding: .5em 1em;
|
||||||
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
.nav > li > a:hover,
|
.nav > li > a:hover,
|
||||||
.nav > li > a:focus {
|
.nav > li > a:focus {
|
||||||
@@ -3903,29 +3904,34 @@ a.label:focus {
|
|||||||
background-color: #c9302c;
|
background-color: #c9302c;
|
||||||
}
|
}
|
||||||
.badge {
|
.badge {
|
||||||
|
position: relative;
|
||||||
|
top: -.1em;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 10px;
|
padding-right: .6em;
|
||||||
padding: 3px 7px;
|
padding-left: .6em;
|
||||||
font-size: .85rem;
|
font-size: .75em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 1;
|
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
vertical-align: baseline;
|
|
||||||
background-color: #818a91;
|
background-color: #818a91;
|
||||||
border-radius: 10px;
|
border-radius: 2em;
|
||||||
|
/* .btn & {
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
.badge:empty {
|
.badge:empty {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.btn .badge {
|
.badge.pull-left,
|
||||||
position: relative;
|
.badge.pull-right {
|
||||||
top: -1px;
|
top: .2em;
|
||||||
}
|
}
|
||||||
.btn-xs .badge {
|
.btn-xs .badge {
|
||||||
top: 0;
|
/*top: 0;*/
|
||||||
padding: 1px 5px;
|
/*padding: 1px 5px;*/
|
||||||
}
|
}
|
||||||
a.badge:hover,
|
a.badge:hover,
|
||||||
a.badge:focus {
|
a.badge:focus {
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+15
-9
@@ -5,16 +5,16 @@
|
|||||||
|
|
||||||
// Base class
|
// Base class
|
||||||
.badge {
|
.badge {
|
||||||
|
position: relative;
|
||||||
|
top: -.1em;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 10px;
|
padding-left: .6em;
|
||||||
padding: 3px 7px;
|
padding-right: .6em;
|
||||||
font-size: @font-size-small;
|
font-size: .75em;
|
||||||
font-weight: @badge-font-weight;
|
font-weight: @badge-font-weight;
|
||||||
color: @badge-color;
|
color: @badge-color;
|
||||||
line-height: @badge-line-height;
|
|
||||||
vertical-align: baseline;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
background-color: @badge-bg;
|
background-color: @badge-bg;
|
||||||
.border-radius(@badge-border-radius);
|
.border-radius(@badge-border-radius);
|
||||||
|
|
||||||
@@ -23,14 +23,20 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.pull-left,
|
||||||
|
&.pull-right {
|
||||||
|
top: .2em;
|
||||||
|
}
|
||||||
|
|
||||||
// Quick fix for badges in buttons
|
// Quick fix for badges in buttons
|
||||||
.btn & {
|
/* .btn & {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -1px;
|
top: -1px;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
.btn-xs & {
|
.btn-xs & {
|
||||||
top: 0;
|
/*top: 0;*/
|
||||||
padding: 1px 5px;
|
/*padding: 1px 5px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hover state, but only for links
|
// Hover state, but only for links
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
padding: @nav-link-padding;
|
padding: @nav-link-padding;
|
||||||
|
line-height: @line-height-base;
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|||||||
+2
-2
@@ -369,7 +369,7 @@
|
|||||||
//##
|
//##
|
||||||
|
|
||||||
//=== Shared nav styles
|
//=== Shared nav styles
|
||||||
@nav-link-padding: 10px 15px;
|
@nav-link-padding: .5em 1em;
|
||||||
@nav-link-hover-bg: @gray-lighter;
|
@nav-link-hover-bg: @gray-lighter;
|
||||||
|
|
||||||
@nav-disabled-link-color: @gray-light;
|
@nav-disabled-link-color: @gray-light;
|
||||||
@@ -675,7 +675,7 @@
|
|||||||
|
|
||||||
@badge-font-weight: bold;
|
@badge-font-weight: bold;
|
||||||
@badge-line-height: 1;
|
@badge-line-height: 1;
|
||||||
@badge-border-radius: 10px;
|
@badge-border-radius: 2em;
|
||||||
|
|
||||||
|
|
||||||
//== Breadcrumbs
|
//== Breadcrumbs
|
||||||
|
|||||||
Reference in New Issue
Block a user