From 83846ba0d629a3882e727ccc7b64684507206cce Mon Sep 17 00:00:00 2001 From: Roberto - phproberto Date: Tue, 10 Jul 2012 08:12:16 +0200 Subject: [PATCH] Fixes #4002 responsive utilities classes --- docs/assets/css/bootstrap-responsive.css | 28 ++++++++++++--------- less/responsive-utilities.less | 14 +++++------ less/tests/css-tests.html | 31 ++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 19 deletions(-) diff --git a/docs/assets/css/bootstrap-responsive.css b/docs/assets/css/bootstrap-responsive.css index a584b806e6..8916f313c1 100644 --- a/docs/assets/css/bootstrap-responsive.css +++ b/docs/assets/css/bootstrap-responsive.css @@ -57,34 +57,38 @@ display: none !important; } +.visible-desktop { + display: inherit !important; +} + @media (min-width: 768px) and (max-width: 979px) { - .visible-tablet { - display: inherit !important; - } - .hidden-tablet { - display: none !important; - } .hidden-desktop { display: inherit !important; } .visible-desktop { display: none !important ; } + .visible-tablet { + display: inherit !important; + } + .hidden-tablet { + display: none !important; + } } @media (max-width: 767px) { - .visible-phone { - display: inherit !important; - } - .hidden-phone { - display: none !important; - } .hidden-desktop { display: inherit !important; } .visible-desktop { display: none !important; } + .visible-phone { + display: inherit !important; + } + .hidden-phone { + display: none !important; + } } @media (min-width: 1200px) { diff --git a/less/responsive-utilities.less b/less/responsive-utilities.less index 59deafe81c..2c3f6c15fe 100644 --- a/less/responsive-utilities.less +++ b/less/responsive-utilities.less @@ -15,29 +15,29 @@ // For desktops .visible-phone { display: none !important; } .visible-tablet { display: none !important; } -.visible-desktop { } // Don't set initially .hidden-phone { } .hidden-tablet { } .hidden-desktop { display: none !important; } +.visible-desktop { display: inherit !important; } // Tablets & small desktops only @media (min-width: 768px) and (max-width: 979px) { + // Hide everything else + .hidden-desktop { display: inherit !important; } + .visible-desktop { display: none !important ; } // Show .visible-tablet { display: inherit !important; } // Hide .hidden-tablet { display: none !important; } - // Hide everything else - .hidden-desktop { display: inherit !important; } - .visible-desktop { display: none !important ; } } // Phones only @media (max-width: 767px) { + // Hide everything else + .hidden-desktop { display: inherit !important; } + .visible-desktop { display: none !important; } // Show .visible-phone { display: inherit !important; } // Use inherit to restore previous behavior // Hide .hidden-phone { display: none !important; } - // Hide everything else - .hidden-desktop { display: inherit !important; } - .visible-desktop { display: none !important; } } diff --git a/less/tests/css-tests.html b/less/tests/css-tests.html index 4b8b1a2772..341c802645 100644 --- a/less/tests/css-tests.html +++ b/less/tests/css-tests.html @@ -1019,6 +1019,37 @@ + + + + +

Visible on...

+ + + +

Hidden on...

+ + +