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
d2630ff8
Commit
d2630ff8
authored
Feb 20, 2012
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce new mixin to do navbar vertical centering
parent
143b3db2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
14 deletions
+25
-14
docs/assets/bootstrap.zip
docs/assets/bootstrap.zip
+0
-0
docs/assets/css/bootstrap.css
docs/assets/css/bootstrap.css
+6
-4
less/mixins.less
less/mixins.less
+11
-3
less/navbar.less
less/navbar.less
+8
-7
No files found.
docs/assets/bootstrap.zip
View file @
d2630ff8
No preview for this file type
docs/assets/css/bootstrap.css
View file @
d2630ff8
...
...
@@ -2559,14 +2559,16 @@ button.btn.btn-small, input[type="submit"].btn.btn-small {
.navbar-form
:after
{
clear
:
both
;
}
.navbar-form
input
,
.navbar-form
select
,
.navbar-form
.radio
,
.navbar-form
.checkbox
{
margin-top
:
5px
;
}
.navbar-form
input
,
.navbar-form
select
{
display
:
inline-block
;
margin-top
:
5px
;
margin-bottom
:
0
;
}
.navbar-form
.radio
,
.navbar-form
.checkbox
{
margin-top
:
5px
;
}
.navbar-form
input
[
type
=
"image"
],
.navbar-form
input
[
type
=
"checkbox"
],
.navbar-form
input
[
type
=
"radio"
]
{
margin-top
:
3px
;
}
...
...
less/mixins.less
View file @
d2630ff8
...
...
@@ -531,7 +531,7 @@
// COMPONENT MIXINS
// --------------------------------------------------
//
NAV DIVIDER
//
Horizontal dividers
// -------------------------
// Dividers (basically an hr) within dropdowns and nav lists
.nav-divider() {
...
...
@@ -549,7 +549,7 @@
*margin: -5px 0 5px;
}
// B
UTTON BACKGROUNDS
// B
utton backgrounds
// ------------------
.buttonBackground(@startColor, @endColor) {
// gradientBar will set the background to a pleasing blend of these, to support IE<=9
...
...
@@ -568,7 +568,15 @@
}
}
// POPOVER ARROWS
// Navbar vertical align
// -------------------------
// Vertically center elements in the navbar.
// Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
.navbarVerticalAlign(@elementHeight) {
margin-top: (@navbarHeight - @elementHeight) / 2;
}
// Popover arrows
// -------------------------
// For tipsies and popovers
#popoverArrow {
...
...
less/navbar.less
View file @
d2630ff8
...
...
@@ -74,7 +74,7 @@
// Buttons in navbar
.btn,
.btn-group {
margin-top: 5px; // make buttons vertically centered
in navbar
.navbarVerticalAlign(30px); // Vertically center
in navbar
}
.btn-group .btn {
margin-top: 0; // then undo the margin here so we don't accidentally double it
...
...
@@ -86,15 +86,16 @@
margin-bottom: 0; // remove default bottom margin
.clearfix();
input,
select,
.radio,
.checkbox {
.navbarVerticalAlign(30px); // Vertically center in navbar
}
input,
select {
display: inline-block;
margin-top: 5px;
margin-bottom: 0;
}
.radio,
.checkbox {
margin-top: 5px;
}
input[type="image"],
input[type="checkbox"],
input[type="radio"] {
...
...
@@ -114,7 +115,7 @@
.navbar-search {
position: relative;
float: left;
margin-top: 6px;
.navbarVerticalAlign(28px); // Vertically center in navbar
margin-bottom: 0;
.search-query {
padding: 4px 9px;
...
...
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