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
f6dc5669
Commit
f6dc5669
authored
Jan 27, 2012
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
overhaul navbar behavior in responsive css
parent
800d0b24
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
228 additions
and
139 deletions
+228
-139
docs/assets/css/bootstrap-responsive.css
docs/assets/css/bootstrap-responsive.css
+90
-60
docs/assets/css/bootstrap.css
docs/assets/css/bootstrap.css
+2
-2
docs/assets/css/docs.css
docs/assets/css/docs.css
+26
-11
less/navbar.less
less/navbar.less
+2
-1
less/responsive.less
less/responsive.less
+108
-65
No files found.
docs/assets/css/bootstrap-responsive.css
View file @
f6dc5669
...
@@ -3,60 +3,6 @@
...
@@ -3,60 +3,6 @@
visibility
:
hidden
;
visibility
:
hidden
;
}
}
@media
(
max-width
:
480px
)
{
@media
(
max-width
:
480px
)
{
.navbar
.nav
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
180px
;
padding-top
:
40px
;
list-style
:
none
;
}
.navbar
.nav
,
.navbar
.nav
>
li
:last-child
a
{
-webkit-border-radius
:
0
0
4px
0
;
-moz-border-radius
:
0
0
4px
0
;
border-radius
:
0
0
4px
0
;
}
.navbar
.nav
>
li
{
float
:
none
;
display
:
none
;
}
.navbar
.nav
>
li
>
a
{
float
:
none
;
background-color
:
#222
;
}
.navbar
.nav
>
.active
{
display
:
block
;
position
:
absolute
;
top
:
0
;
left
:
0
;
}
.navbar
.nav
>
.active
>
a
{
background-color
:
transparent
;
}
.navbar
.nav
>
.active
>
a
:hover
{
background-color
:
#333
;
}
.navbar
.nav
>
.active
>
a
:after
{
display
:
inline-block
;
width
:
0
;
height
:
0
;
margin-top
:
8px
;
margin-left
:
6px
;
text-indent
:
-99999px
;
vertical-align
:
top
;
border-left
:
4px
solid
transparent
;
border-right
:
4px
solid
transparent
;
border-top
:
4px
solid
#ffffff
;
opacity
:
1
;
filter
:
alpha
(
opacity
=
100
);
content
:
"↓"
;
}
.navbar
.nav
:hover
>
li
{
display
:
block
;
}
.navbar
.nav
:hover
>
li
>
a
:hover
{
background-color
:
#333
;
}
.form-horizontal
.control-group
>
label
{
.form-horizontal
.control-group
>
label
{
float
:
none
;
float
:
none
;
width
:
auto
;
width
:
auto
;
...
@@ -88,12 +34,6 @@
...
@@ -88,12 +34,6 @@
}
}
}
}
@media
(
max-width
:
768px
)
{
@media
(
max-width
:
768px
)
{
.navbar-fixed
{
position
:
absolute
;
}
.navbar-fixed
.nav
{
float
:
none
;
}
.container
{
.container
{
width
:
auto
;
width
:
auto
;
padding
:
0
20px
;
padding
:
0
20px
;
...
@@ -187,6 +127,96 @@
...
@@ -187,6 +127,96 @@
margin-left
:
788px
;
margin-left
:
788px
;
}
}
}
}
@media
(
max-width
:
940px
)
{
body
{
padding-top
:
0
;
}
.navbar-fixed-top
{
position
:
static
;
margin-bottom
:
36px
;
}
.navbar-inner
{
padding
:
10px
;
background-image
:
none
;
}
.navbar
.container
{
padding
:
0
;
}
.navbar
.brand
{
float
:
none
;
display
:
block
;
padding-left
:
15px
;
padding-right
:
15px
;
margin
:
0
;
}
.navbar
.nav
{
float
:
none
;
margin
:
9px
0
;
}
.navbar
.nav
>
li
{
float
:
none
;
}
.navbar
.nav
>
li
>
a
{
margin-bottom
:
2px
;
}
.navbar
.nav
>
.vertical-divider
{
display
:
none
;
}
.navbar
.nav
>
li
>
a
,
.navbar
.dropdown-menu
a
{
padding
:
6px
15px
;
font-weight
:
bold
;
color
:
#999999
;
-webkit-border-radius
:
3px
;
-moz-border-radius
:
3px
;
border-radius
:
3px
;
}
.navbar
.dropdown-menu
li
+
li
a
{
margin-bottom
:
2px
;
}
.navbar
.nav
>
li
>
a
:hover
,
.navbar
.dropdown-menu
a
:hover
{
background-color
:
#222222
;
}
.navbar
.dropdown-menu
{
position
:
static
;
display
:
block
;
float
:
none
;
max-width
:
none
;
margin
:
0
15px
;
padding
:
0
;
background-color
:
transparent
;
border
:
none
;
-webkit-border-radius
:
0
;
-moz-border-radius
:
0
;
border-radius
:
0
;
-webkit-box-shadow
:
none
;
-moz-box-shadow
:
none
;
box-shadow
:
none
;
}
.navbar
.dropdown-menu
:before
,
.navbar
.dropdown-menu
:after
{
display
:
none
;
}
.navbar
.dropdown-menu
.divider
{
display
:
none
;
}
.navbar-form
,
.navbar-search
{
float
:
none
;
padding
:
9px
15px
;
margin
:
9px
0
;
border-top
:
1px
solid
#222222
;
border-bottom
:
1px
solid
#222222
;
-webkit-box-shadow
:
inset
0
1px
0
rgba
(
255
,
255
,
255
,
0.1
),
0
1px
0
rgba
(
255
,
255
,
255
,
0.1
);
-moz-box-shadow
:
inset
0
1px
0
rgba
(
255
,
255
,
255
,
0.1
),
0
1px
0
rgba
(
255
,
255
,
255
,
0.1
);
box-shadow
:
inset
0
1px
0
rgba
(
255
,
255
,
255
,
0.1
),
0
1px
0
rgba
(
255
,
255
,
255
,
0.1
);
}
.navbar
.nav.pull-right
{
float
:
none
;
margin-left
:
0
;
}
.navbar-static
.navbar-inner
{
padding-left
:
10px
;
padding-right
:
10px
;
}
}
/*
/*
@media (min-width: 1210px) {
@media (min-width: 1210px) {
...
...
docs/assets/css/bootstrap.css
View file @
f6dc5669
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Designed and built with all the love in the world @twitter by @mdo and @fat.
* Date: Fri Jan 27 1
5:27:51
PST 2012
* Date: Fri Jan 27 1
6:25:59
PST 2012
*/
*/
article
,
article
,
aside
,
aside
,
...
@@ -2004,7 +2004,7 @@ table .span12 {
...
@@ -2004,7 +2004,7 @@ table .span12 {
color
:
#ffffff
;
color
:
#ffffff
;
text-decoration
:
none
;
text-decoration
:
none
;
}
}
.navbar
.nav
.active
>
a
{
.navbar
.nav
.active
>
a
,
.navbar
.nav
.active
>
a
:hover
{
color
:
#ffffff
;
color
:
#ffffff
;
text-decoration
:
none
;
text-decoration
:
none
;
background-color
:
#222222
;
background-color
:
#222222
;
...
...
docs/assets/css/docs.css
View file @
f6dc5669
...
@@ -723,6 +723,11 @@ form.well {
...
@@ -723,6 +723,11 @@ form.well {
@media
(
max-width
:
768px
)
{
@media
(
max-width
:
768px
)
{
/* Remove any padding from the body */
body
{
padding-top
:
0
;
}
/* Subnav */
/* Subnav */
.subnav
{
.subnav
{
position
:
static
;
position
:
static
;
...
@@ -745,13 +750,6 @@ form.well {
...
@@ -745,13 +750,6 @@ form.well {
border-top
:
1px
solid
#e5e5e5
;
border-top
:
1px
solid
#e5e5e5
;
}
}
/* Adjust the jumbotron */
.jumbotron
.benefits
{
position
:
relative
;
width
:
auto
;
margin
:
36px
0
;
}
/* Popovers */
/* Popovers */
.large-bird
{
.large-bird
{
display
:
none
;
display
:
none
;
...
@@ -787,9 +785,14 @@ form.well {
...
@@ -787,9 +785,14 @@ form.well {
.jumbotron
h1
{
.jumbotron
h1
{
font-size
:
54px
;
font-size
:
54px
;
}
}
.masthead
p
{
font-size
:
25px
;
line-height
:
36px
;
}
.jumbotron
h1
,
.jumbotron
h1
,
.jumbotron
p
{
.jumbotron
p
{
margin-right
:
0
;
margin-right
:
0
;
margin-left
:
0
;
}
}
}
}
...
@@ -797,15 +800,27 @@ form.well {
...
@@ -797,15 +800,27 @@ form.well {
@media
(
min-width
:
768px
)
and
(
max-width
:
940px
)
{
@media
(
min-width
:
768px
)
and
(
max-width
:
940px
)
{
/* Remove any padding from the body */
body
{
padding-top
:
0
;
}
/* Scale down the jumbotron content */
/* Scale down the jumbotron content */
.jumbotron
h1
{
.jumbotron
h1
{
font-size
:
72px
;
font-size
:
72px
;
}
}
/* Provide enough space on right-hand side for benefits list */
}
.jumbotron
h1
,
.jumbotron
p
{
@media
(
max-width
:
940px
)
{
margin-right
:
40%
;
/* Unfloat brand */
.navbar-fixed-top
.brand
{
float
:
none
;
margin-left
:
0
;
padding-left
:
15px
;
padding-right
:
15px
;
}
}
}
}
less/navbar.less
View file @
f6dc5669
...
@@ -165,7 +165,8 @@
...
@@ -165,7 +165,8 @@
}
}
// Active nav items
// Active nav items
.navbar .nav .active > a {
.navbar .nav .active > a,
.navbar .nav .active > a:hover {
color: @navbarLinkColorHover;
color: @navbarLinkColorHover;
text-decoration: none;
text-decoration: none;
background-color: @navbarBackground;
background-color: @navbarBackground;
...
...
less/responsive.less
View file @
f6dc5669
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
// ------------------
// ------------------
// Hide from screenreaders and browsers
// Hide from screenreaders and browsers
// Credit: HTML5
BP
// Credit: HTML5
Boilerplate
.hidden {
.hidden {
display: none;
display: none;
visibility: hidden;
visibility: hidden;
...
@@ -27,62 +27,6 @@
...
@@ -27,62 +27,6 @@
@media (max-width: 480px) {
@media (max-width: 480px) {
// Make the nav work for small devices
.navbar {
.nav {
position: absolute;
top: 0;
left: 0;
width: 180px;
padding-top: 40px;
list-style: none;
}
.nav,
.nav > li:last-child a {
.border-radius(0 0 4px 0);
}
.nav > li {
float: none;
display: none;
}
.nav > li > a {
float: none;
background-color: #222;
}
.nav > .active {
display: block;
position: absolute;
top: 0;
left: 0;
}
.nav > .active > a {
background-color: transparent;
}
.nav > .active > a:hover {
background-color: #333;
}
.nav > .active > a:after {
display: inline-block;
width: 0;
height: 0;
margin-top: 8px;
margin-left: 6px;
text-indent: -99999px;
vertical-align: top;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid @white;
.opacity(100);
content: "↓";
}
.nav:hover > li {
display: block;
}
.nav:hover > li > a:hover {
background-color: #333;
}
}
// Remove the horizontal form styles
// Remove the horizontal form styles
.form-horizontal .control-group > label {
.form-horizontal .control-group > label {
float: none;
float: none;
...
@@ -125,14 +69,8 @@
...
@@ -125,14 +69,8 @@
@media (max-width: 768px) {
@media (max-width: 768px) {
// Unfix the navbar
// GRID & CONTAINERS
.navbar-fixed {
// -----------------
position: absolute;
}
.navbar-fixed .nav {
float: none;
}
// Remove width from containers
// Remove width from containers
.container {
.container {
width: auto;
width: auto;
...
@@ -209,6 +147,111 @@
...
@@ -209,6 +147,111 @@
}
}
// TABLETS AND BELOW
// -----------------
@media (max-width: 940px) {
// UNFIX THE TOPBAR
// ----------------
// Remove any padding from the body
body {
padding-top: 0;
}
// Unfix the navbar
.navbar-fixed-top {
position: static;
margin-bottom: @baseLineHeight * 2;
}
.navbar-inner {
padding: 10px;
background-image: none;
}
.navbar .container {
padding: 0;
}
// Account for brand name
.navbar .brand {
float: none;
display: block;
padding-left: 15px;
padding-right: 15px;
margin: 0;
}
// Block-level the nav
.navbar .nav {
float: none;
margin: (@baseLineHeight / 2) 0;
}
.navbar .nav > li {
float: none;
}
.navbar .nav > li > a {
margin-bottom: 2px;
}
.navbar .nav > .vertical-divider {
display: none;
}
// Nav and dropdown links in navbar
.navbar .nav > li > a,
.navbar .dropdown-menu a {
padding: 6px 15px;
font-weight: bold;
color: @navbarLinkColor;
.border-radius(3px);
}
.navbar .dropdown-menu li + li a {
margin-bottom: 2px;
}
.navbar .nav > li > a:hover,
.navbar .dropdown-menu a:hover {
background-color: @navbarBackground;
}
// Dropdowns in the navbar
.navbar .dropdown-menu {
position: static;
display: block;
float: none;
max-width: none;
margin: 0 15px;
padding: 0;
background-color: transparent;
border: none;
.border-radius(0);
.box-shadow(none);
}
.navbar .dropdown-menu:before,
.navbar .dropdown-menu:after {
display: none;
}
.navbar .dropdown-menu .divider {
display: none;
}
// Forms in navbar
.navbar-form,
.navbar-search {
float: none;
padding: (@baseLineHeight / 2) 15px;
margin: (@baseLineHeight / 2) 0;
border-top: 1px solid @navbarBackground;
border-bottom: 1px solid @navbarBackground;
@shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
.box-shadow(@shadow);
}
// Pull right (secondary) nav content
.navbar .nav.pull-right {
float: none;
margin-left: 0;
}
// Static navbar
.navbar-static .navbar-inner {
padding-left: 10px;
padding-right: 10px;
}
}
// LARGE DESKTOP & UP
// LARGE DESKTOP & UP
// ------------------
// ------------------
/*
/*
...
...
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