responsive-utilities.less 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // Responsive: Utility classes
  3. // --------------------------------------------------
  4. // Hide from screenreaders and browsers
  5. // Credit: HTML5 Boilerplate
  6. .hidden {
  7. display: none;
  8. visibility: hidden;
  9. }
  10. // Visibility utilities
  11. // For desktops
  12. .visible-phone { display: none !important; }
  13. .visible-tablet { display: none !important; }
  14. .hidden-phone { }
  15. .hidden-tablet { }
  16. .hidden-desktop { display: none !important; }
  17. .visible-desktop { display: inherit !important; }
  18. // Tablets & small desktops only
  19. @media (min-width: 768px) and (max-width: 979px) {
  20. // Hide everything else
  21. .hidden-desktop { display: inherit !important; }
  22. .visible-desktop { display: none !important ; }
  23. // Show
  24. .visible-tablet { display: inherit !important; }
  25. // Hide
  26. .hidden-tablet { display: none !important; }
  27. }
  28. // Phones only
  29. @media (max-width: 767px) {
  30. // Hide everything else
  31. .hidden-desktop { display: inherit !important; }
  32. .visible-desktop { display: none !important; }
  33. // Show
  34. .visible-phone { display: inherit !important; } // Use inherit to restore previous behavior
  35. // Hide
  36. .hidden-phone { display: none !important; }
  37. }