]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
make visible/hidden classes mixable
authorElvis Ratzlaff <eratzlaff@adelantos.com.py>
Mon, 19 Aug 2013 04:23:53 +0000 (00:23 -0400)
committerElvis Ratzlaff <eratzlaff@adelantos.com.py>
Mon, 19 Aug 2013 04:23:53 +0000 (00:23 -0400)
less/responsive-utilities.less

index 062d6820ce2a8aeb5b97ade1a9cb3b95caf3811c..b83a75acfc190215eb6b681525bb069152d811d0 100644 (file)
 // Visibility utilities
 
 .visible-xs {
-  .responsive-visibility();
-  @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
-    .responsive-invisibility();
+  .responsive-invisibility();
+  @media (max-width: @screen-phone-max) {
+    .responsive-visibility();
   }
-  @media (min-width: @screen-md) and (max-width: @screen-md-max) {
-    .responsive-invisibility();
+  &.visible-sm {
+    @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
+      .responsive-visibility();
+    }
   }
-  @media (min-width: @screen-lg) {
-    .responsive-invisibility();
+  &.visible-md {
+    @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
+      .responsive-visibility();
+    }    
+  }
+  &.visible-lg {
+    @media (min-width: @screen-large-desktop) {
+      .responsive-visibility();
+    }    
   }
 }
 .visible-sm {
   .responsive-invisibility();
-  @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
+  &.visible-xs {
+    @media (max-width: @screen-phone-max) {
+      .responsive-visibility();
+    }    
+  }
+  @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
     .responsive-visibility();
   }
-  @media (min-width: @screen-md) and (max-width: @screen-md-max) {
-    .responsive-invisibility();
+  &.visible-md {
+    @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
+      .responsive-visibility();
+    }    
   }
-  @media (min-width: @screen-lg) {
-    .responsive-invisibility();
+  &.visible-lg {
+    @media (min-width: @screen-large-desktop) {
+      .responsive-visibility();
+    }    
   }
 }
 .visible-md {
   .responsive-invisibility();
-  @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
-    .responsive-invisibility();
+  &.visible-xs {
+    @media (max-width: @screen-phone-max) {
+      .responsive-visibility();
+    }    
   }
-  @media (min-width: @screen-md) and (max-width: @screen-md-max) {
+  &.visible-sm {
+    @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
+      .responsive-visibility();
+    }
+  }
+  @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
     .responsive-visibility();
   }
-  @media (min-width: @screen-lg) {
-    .responsive-invisibility();
+  &.visible-lg {
+    @media (min-width: @screen-large-desktop) {
+      .responsive-visibility();
+    }    
   }
 }
 .visible-lg {
   .responsive-invisibility();
-  @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
-    .responsive-invisibility();
-  }
-  @media (min-width: @screen-md) and (max-width: @screen-md-max) {
-    .responsive-invisibility();
-  }
-  @media (min-width: @screen-lg) {
+  &.visible-xs {
+    @media (max-width: @screen-phone-max) {
+      .responsive-visibility();
+    }    
+  }
+  &.visible-sm {
+    @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
+      .responsive-visibility();
+    }
+  }
+  &.visible-md {
+    @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
+      .responsive-visibility();
+    }    
+  }
+  @media (min-width: @screen-large-desktop) {
     .responsive-visibility();
   }
 }
 
 .hidden-xs {
-  .responsive-invisibility();
-  @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
-    .responsive-visibility();
+  .responsive-visibility();
+  @media (max-width: @screen-phone-max) {
+    .responsive-invisibility();
   }
-  @media (min-width: @screen-md) and (max-width: @screen-md-max) {
-    .responsive-visibility();
+  &.hidden-sm {
+    @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
+      .responsive-invisibility();
+    }    
   }
-  @media (min-width: @screen-lg) {
-    .responsive-visibility();
+  &.hidden-md {
+    @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
+      .responsive-invisibility();
+    }    
+  }
+  &.hidden-lg {
+    @media (min-width: @screen-large-desktop) {
+      .responsive-invisibility();
+    }    
   }
 }
 .hidden-sm {
   .responsive-visibility();
-  @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
+  &.hidden-xs {
+    @media (max-width: @screen-phone-max) {
+      .responsive-invisibility();
+    }
+  }
+  @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
     .responsive-invisibility();
   }
-  @media (min-width: @screen-md) and (max-width: @screen-md-max) {
-    .responsive-visibility();
+  &.hidden-md {
+    @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
+      .responsive-invisibility();
+    }    
   }
-  @media (min-width: @screen-lg) {
-    .responsive-visibility();
+  &.hidden-lg {
+    @media (min-width: @screen-large-desktop) {
+      .responsive-invisibility();
+    }    
   }
 }
 .hidden-md {
   .responsive-visibility();
-  @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
-    .responsive-visibility();
+  &.hidden-xs {
+    @media (max-width: @screen-phone-max) {
+      .responsive-invisibility();
+    }    
   }
-  @media (min-width: @screen-md) and (max-width: @screen-md-max) {
+  &.hidden-sm {
+    @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
+      .responsive-invisibility();
+    }    
+  }
+  @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
     .responsive-invisibility();
   }
-  @media (min-width: @screen-lg) {
-    .responsive-visibility();
+  &.hidden-lg {
+    @media (min-width: @screen-large-desktop) {
+      .responsive-invisibility();
+    }    
   }
 }
 .hidden-lg {
   .responsive-visibility();
-  @media (min-width: @screen-sm) and (max-width: @screen-sm-max) {
-    .responsive-visibility();
-  }
-  @media (min-width: @screen-md) and (max-width: @screen-md-max) {
-    .responsive-visibility();
-  }
-  @media (min-width: @screen-lg) {
+  &.hidden-xs {
+    @media (max-width: @screen-phone-max) {
+      .responsive-invisibility();
+    }    
+  }
+  &.hidden-sm {
+    @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
+      .responsive-invisibility();
+    }    
+  }
+  &.hidden-md {
+    @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
+      .responsive-invisibility();
+    }    
+  }
+  @media (min-width: @screen-large-desktop) {
     .responsive-invisibility();
   }
 }