aboutsummaryrefslogtreecommitdiff
path: root/lib/responsive.less
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2012-01-08 11:24:16 -0800
committerJacob Thornton <[email protected]>2012-01-08 11:24:16 -0800
commitc78016e3acaa84adbdde9297c1082825b165f77c (patch)
tree8fa8d6725bd712de193629f274e81af4a12deb0d /lib/responsive.less
parentf1cbd22b99c3fec54d18341c31cfb1c237db44f2 (diff)
parentcb5245869869d6ee46b47ec75ceee07013acdda0 (diff)
downloadbootstrap-c78016e3acaa84adbdde9297c1082825b165f77c.tar.xz
bootstrap-c78016e3acaa84adbdde9297c1082825b165f77c.zip
Merge branch '2.0-wip' of https://github.com/twitter/bootstrap into 2.0-wip
Diffstat (limited to 'lib/responsive.less')
-rw-r--r--lib/responsive.less114
1 files changed, 67 insertions, 47 deletions
diff --git a/lib/responsive.less b/lib/responsive.less
index 7856121be..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,53 +147,6 @@
margin: 0;
}
- // Make the nav work for small devices
- .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;
- }
- .navbar ul .active > a {
- background-color: transparent;
- }
- .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 > .active a:hover {
- background-color: rgba(255,255,255,.05);
- }
}