Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
508a93d9
Commit
508a93d9
authored
12 years ago
by
Mark Otto
Browse files
Options
Download
Email Patches
Plain Diff
make fixing of subnav work again
parent
6662f622
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/assets/css/bootstrap-responsive.css
+6
-5
docs/assets/css/bootstrap-responsive.css
docs/assets/js/application.js
+4
-4
docs/assets/js/application.js
less/responsive-navbar.less
+6
-5
less/responsive-navbar.less
with
16 additions
and
14 deletions
+16
-14
docs/assets/css/bootstrap-responsive.css
+
6
-
5
View file @
508a93d9
...
...
@@ -1004,7 +1004,7 @@
height
:
auto
!important
;
overflow
:
visible
!important
;
}
.subnav-fixed
{
.
navbar-
subnav-fixed
{
position
:
fixed
;
top
:
40px
;
right
:
0
;
...
...
@@ -1020,13 +1020,14 @@
-moz-box-shadow
:
inset
0
1px
0
#ffffff
,
0
1px
5px
rgba
(
0
,
0
,
0
,
0.1
);
box-shadow
:
inset
0
1px
0
#ffffff
,
0
1px
5px
rgba
(
0
,
0
,
0
,
0.1
);
}
.subnav-fixed
.nav
{
max-width
:
780px
;
.navbar-subnav-fixed
.nav
{
float
:
none
;
max-width
:
970px
;
padding
:
0
1px
;
margin
:
0
auto
;
}
.subnav
.nav
>
li
:first-child
>
a
,
.subnav
.nav
>
li
:first-child
>
a
:hover
{
.
navbar-
subnav
.nav
>
li
:first-child
>
a
,
.
navbar-
subnav
.nav
>
li
:first-child
>
a
:hover
{
-webkit-border-radius
:
0
;
-moz-border-radius
:
0
;
border-radius
:
0
;
...
...
This diff is collapsed.
Click to expand it.
docs/assets/js/application.js
+
4
-
4
View file @
508a93d9
...
...
@@ -45,8 +45,8 @@
// fix sub nav on scroll
var
$win
=
$
(
window
)
,
$nav
=
$
(
'
.subnav
'
)
,
navTop
=
$
(
'
.subnav
'
).
length
&&
$
(
'
.subnav
'
).
offset
().
top
-
40
,
$nav
=
$
(
'
.
navbar-
subnav
'
)
,
navTop
=
$
(
'
.
navbar-
subnav
'
).
length
&&
$
(
'
.
navbar-
subnav
'
).
offset
().
top
-
40
,
isFixed
=
0
processScroll
()
...
...
@@ -62,10 +62,10 @@
var
i
,
scrollTop
=
$win
.
scrollTop
()
if
(
scrollTop
>=
navTop
&&
!
isFixed
)
{
isFixed
=
1
$nav
.
addClass
(
'
subnav-fixed
'
)
$nav
.
addClass
(
'
navbar-
subnav-fixed
'
)
}
else
if
(
scrollTop
<=
navTop
&&
isFixed
)
{
isFixed
=
0
$nav
.
removeClass
(
'
subnav-fixed
'
)
$nav
.
removeClass
(
'
navbar-
subnav-fixed
'
)
}
}
...
...
This diff is collapsed.
Click to expand it.
less/responsive-navbar.less
+
6
-
5
View file @
508a93d9
...
...
@@ -153,7 +153,7 @@
}
// Fixed subnav on scroll, but only for 980px and up (sorry IE!)
.subnav-fixed {
.
navbar-
subnav-fixed {
position: fixed;
top: 40px;
left: 0;
...
...
@@ -169,13 +169,14 @@
box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); /* IE6-9 */
}
.subnav-fixed .nav {
max-width: 780px;
.navbar-subnav-fixed .nav {
float: none;
max-width: 970px;
margin: 0 auto;
padding: 0 1px;
}
.subnav .nav > li:first-child > a,
.subnav .nav > li:first-child > a:hover {
.
navbar-
subnav .nav > li:first-child > a,
.
navbar-
subnav .nav > li:first-child > a:hover {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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