aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-01-08 03:00:06 -0800
committerMark Otto <[email protected]>2012-01-08 03:00:06 -0800
commitb7acbd8476060bc1f2da9837693b0b86b68423c5 (patch)
tree0ce8b95fb9e279a28b032d9bc6229a89f6c523bb /lib
parent9e7acc637057292205906edc99fb23a49c937afa (diff)
downloadbootstrap-b7acbd8476060bc1f2da9837693b0b86b68423c5.tar.xz
bootstrap-b7acbd8476060bc1f2da9837693b0b86b68423c5.zip
move collapsing navbar nav to 480 and below, unfloat nav for 768 and below to wrap links with position absolute
Diffstat (limited to 'lib')
-rw-r--r--lib/responsive.less124
1 files changed, 67 insertions, 57 deletions
diff --git a/lib/responsive.less b/lib/responsive.less
index 9f8f9ec6c..e87b8495f 100644
--- a/lib/responsive.less
+++ b/lib/responsive.less
@@ -18,6 +18,64 @@
// ---------------------
@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: "&darr;";
+ }
+
+ .nav:hover > li {
+ display: block;
+ }
+ .nav:hover > li > a:hover {
+ background-color: #333;
+ }
+ }
+
// Resize modals
.modal {
width: auto;
@@ -63,6 +121,15 @@
// --------------------------------------------------
@media (max-width: 768px) {
+
+ // Unfix the navbar
+ .navbar-fixed {
+ position: absolute;
+ }
+ .navbar-fixed .nav {
+ float: none;
+ }
+
// Remove width from containers
.container {
width: auto;
@@ -80,63 +147,6 @@
margin: 0;
}
- // 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: "&darr;";
- }
-
- .nav:hover > li {
- display: block;
- }
- .nav:hover > li > a:hover {
- background-color: #333;
- }
- }
-
}