Browse Source

Mobile: Reverted order of screen dimensions styles declarations. Use logical order: large screens are free of rules and as you get smaller screens, you define more restrictions

Yannick Warnier 12 years ago
parent
commit
6128e8952f
1 changed files with 188 additions and 179 deletions
  1. 188 179
      main/css/responsive.css

+ 188 - 179
main/css/responsive.css

@@ -1,176 +1,78 @@
 /* media queries responsive */
 
-/* Phone */
+/* LARGE DESKTOP SCREENS */
+@media (min-width: 1210px) {   
+}
 
-@media (max-width: 320px) {    
-    header #header_center, header #header_right, header #header_left {
-        display:none;
-    }    
-    .navbar {
-      margin-top: 1em;
-    }
-    .navbar .brand {
-         font-size: 14px;
-    }
-    #main_content .span3 #login_block {
-        width: 160px;
-        float: left;
-    }
-    #main_content .span3 #help_block {
-        width: 60px;
-        float: right;
-        margin-left: 10px;
-        margin-right: 10px;
-    }
-    
-    /* No view as link*/
-    #view_as_link {
-        display:none;
-    }
-    
-    /* Smaller brand */
-    .navbar .brand {
-         font-size: 14px;
+/* Tablet or large-screen phone */
+
+@media (min-width: 980px) and (max-width: 1024px) {
+    /* fixes tabs */
+    .subnav .nav-tabs > li > a, .subnav .nav-pills > li > a {
+        padding-left: 6px;
+        padding-right: 6px;
     }
     
-    /* In order to avoid clicking in the main title instead of the expand button */
-    .subnav .navbar-inner .in{
-        margin-top: 45px 
+    /* only for the course tools */
+    #course_tools .row > [class*="span"], #course_tools  .row-fluid > [class*="span"] {     
+        float: left;     
     }
-    #main_content .span3 #login_block {
-        width: 180px;
+    #main_content .span6 {
+        width: 450px;
     }
-    #main_content .span3 #help_block {
-        width: 100px;
+    .section-social #main_content .span3 {
+        width: 200px;
     }
 }
 
-@media (max-width: 480px) {
-    header #header_center, header #header_right, header #header_left {
-        display:none;
-    }    
-    .navbar {
-      margin-top: 1em;
-    }
-    .subnav .navbar-inner .in{
-        margin-top: 45px 
+@media (max-width: 979px) {
+    /* Remove any padding from the body */
+    body {
+        padding-top: 0;
     }
-    
-    /* No chat in mobiles */
-    #chatmain {
-        display:none;
+
+    #topbar_push {
+        height: 0px;
     }
-    
+}
+
+/* Normal tablet or normal-screen phone */
+
+@media (min-width: 768px) and (max-width: 978px) {
     /* No topbar */
     #topbar {
         display:none;
     }
     
-    /* No view as link*/
-    #view_as_link {
-        display:none;
-    }
-    
-    /* Brand fix */
-    .navbar .brand {
-         font-size: 14px;
+    /* fixes tabs */
+    .subnav .nav-tabs > li > a, .subnav .nav-pills > li > a {
+        padding-left: 6px;
+        padding-right: 6px;
     }
     
     .subnav .dropdown-toggle {
         display:none;
-    }
-    
-    .subnav .nav > li > a, .navbar .dropdown-menu a {        
-        color: white;        
-    }
-    
-    /* Footer fixes */
-    
-    footer {
-        border-top: 1px solid #CCCCCC;
-        background-color: #fff;
-        background-image: none;
-        color: #666;
-    }
-    
-    footer #footer_left a, footer #footer_center a, footer #footer_right a {
-        color : #999;
-    }
-    
-    #footer_left , #footer_right #admin_name, #footer_right #software_name {
-        text-align: center !important;
     }    
     
-    footer .container .row {
-        padding-top: 15px;        
-    }
-    
-    /* No resize font */
-    .resize_font {
-        display:none;
-    }
-    
-    h3 {
-        font-size: 18px;
-    }
-    
-    h4 {
-        font-size: 16px;
-    }   
-        
-    /* No notifications */
-    .notification-panel {
-        display:none;
-    }
-    
-    /* Course- home - Show 2 icons instead of one */
-    #course_tools .row .span4 {
-        float: left;        
-        height: 150px;
-        width: 133px;
-    }
-    
-    #course_tools .row .span4 h4 {
-        font-size: 14px;
+    .subnav .nav > li > a, .navbar .dropdown-menu a {      
+        color: #ccc;        
     }
     
-    .subbav .nav > li > a:hover,
-    .subbav .dropdown-menu a:hover {
-        background-color: #555;
-    }
-    #main_content .span3 #login_block {
-        width: 280px;
-        float: left;
-    }
-    #main_content .span3 #help_block {
-        width: 100px;
-        float: right;
-        margin-left: 10px;
-        margin-right: 10px;
+   .subnav .nav > li > a:hover,
+   .subnav .dropdown-menu a:hover {
     }
     .section-social #main_content .span3 {
-        width: 170px;
-    }
-    .section-social #main_content .span4 {
-        width: 200px;
-        margin-left: 5px;
-        float: right;
+        width: 190px;
     }
-    .section-social #main_content .span5 {
-        width: 240px;
+    #main_content .span4, #main_content .span5 {
+        width: 250px;
         margin-left: 5px;
-        float: left;
     }
     #main_content .span6 {
-        width: 400px;
-        min-height: 200px;
+        width: 340px;
     }
     #main_content .span9 {
-        width: 420px;
-        margin-left: 5px;
-    }
-    .section-social #main_content .span9 {
-        width: 480px;
+        width: 500px;
         margin-left: 5px;
     }
 }
@@ -328,77 +230,184 @@
     }
 }
 
-@media (min-width: 768px) and (max-width: 978px) {
+/* Small-screen phones, horizontal */
+
+@media (max-width: 480px) {
+    header #header_center, header #header_right, header #header_left {
+        display:none;
+    }    
+    .navbar {
+      margin-top: 1em;
+    }
+    .subnav .navbar-inner .in{
+        margin-top: 45px 
+    }
+    
+    /* No chat in mobiles */
+    #chatmain {
+        display:none;
+    }
+    
     /* No topbar */
     #topbar {
         display:none;
     }
     
-    /* fixes tabs */
-    .subnav .nav-tabs > li > a, .subnav .nav-pills > li > a {
-        padding-left: 6px;
-        padding-right: 6px;
+    /* No view as link*/
+    #view_as_link {
+        display:none;
+    }
+    
+    /* Brand fix */
+    .navbar .brand {
+         font-size: 14px;
     }
     
     .subnav .dropdown-toggle {
         display:none;
+    }
+    
+    .subnav .nav > li > a, .navbar .dropdown-menu a {        
+        color: white;        
+    }
+    
+    /* Footer fixes */
+    
+    footer {
+        border-top: 1px solid #CCCCCC;
+        background-color: #fff;
+        background-image: none;
+        color: #666;
+    }
+    
+    footer #footer_left a, footer #footer_center a, footer #footer_right a {
+        color : #999;
+    }
+    
+    #footer_left , #footer_right #admin_name, #footer_right #software_name {
+        text-align: center !important;
     }    
     
-    .subnav .nav > li > a, .navbar .dropdown-menu a {      
-        color: #ccc;        
+    footer .container .row {
+        padding-top: 15px;        
     }
     
-   .subnav .nav > li > a:hover,
-   .subnav .dropdown-menu a:hover {
+    /* No resize font */
+    .resize_font {
+        display:none;
+    }
+    
+    h3 {
+        font-size: 18px;
+    }
+    
+    h4 {
+        font-size: 16px;
+    }   
+        
+    /* No notifications */
+    .notification-panel {
+        display:none;
+    }
+    
+    /* Course- home - Show 2 icons instead of one */
+    #course_tools .row .span4 {
+        float: left;        
+        height: 150px;
+        width: 133px;
+    }
+    
+    #course_tools .row .span4 h4 {
+        font-size: 14px;
+    }
+    
+    .subbav .nav > li > a:hover,
+    .subbav .dropdown-menu a:hover {
+        background-color: #555;
+    }
+    #main_content .span3 #login_block {
+        width: 280px;
+        float: left;
+    }
+    #main_content .span3 #help_block {
+        width: 100px;
+        float: right;
+        margin-left: 10px;
+        margin-right: 10px;
     }
     .section-social #main_content .span3 {
-        width: 190px;
+        width: 170px;
     }
-    #main_content .span4, #main_content .span5 {
-        width: 250px;
+    .section-social #main_content .span4 {
+        width: 200px;
         margin-left: 5px;
+        float: right;
+    }
+    .section-social #main_content .span5 {
+        width: 240px;
+        margin-left: 5px;
+        float: left;
     }
     #main_content .span6 {
-        width: 340px;
+        width: 400px;
+        min-height: 200px;
     }
     #main_content .span9 {
-        width: 500px;
+        width: 420px;
+        margin-left: 5px;
+    }
+    .section-social #main_content .span9 {
+        width: 480px;
         margin-left: 5px;
     }
 }
 
-@media (max-width: 979px) {
-    /* Remove any padding from the body */
-    body {
-        padding-top: 0;
-    }
+/* Phone, vertical screen */
 
-    #topbar_push {
-        height: 0px;
+@media (max-width: 320px) {    
+    header #header_center, header #header_right, header #header_left {
+        display:none;
+    }    
+    .navbar {
+      margin-top: 1em;
     }
-}
-
-@media (min-width: 980px) and (max-width: 1024px) {
-    /* fixes tabs */
-    .subnav .nav-tabs > li > a, .subnav .nav-pills > li > a {
-        padding-left: 6px;
-        padding-right: 6px;
+    .navbar .brand {
+         font-size: 14px;
+    }
+    #main_content .span3 #login_block {
+        width: 160px;
+        float: left;
+    }
+    #main_content .span3 #help_block {
+        width: 60px;
+        float: right;
+        margin-left: 10px;
+        margin-right: 10px;
     }
     
-    /* only for the course tools */
-    #course_tools .row > [class*="span"], #course_tools  .row-fluid > [class*="span"] {     
-        float: left;     
+    /* No view as link*/
+    #view_as_link {
+        display:none;
     }
-    #main_content .span6 {
-        width: 450px;
+    
+    /* Smaller brand */
+    .navbar .brand {
+         font-size: 14px;
     }
-    .section-social #main_content .span3 {
-        width: 200px;
+    
+    /* In order to avoid clicking in the main title instead of the expand button */
+    .subnav .navbar-inner .in{
+        margin-top: 45px 
+    }
+    #main_content .span3 #login_block {
+        width: 180px;
+    }
+    #main_content .span3 #help_block {
+        width: 100px;
     }
 }
 
 
-/* LARGE DESKTOP SCREENS */
-@media (min-width: 1210px) {
-    
-}
+
+
+