Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
83846ba0
Commit
83846ba0
authored
Jul 10, 2012
by
Roberto - phproberto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #4002 responsive utilities classes
parent
dbea3e27
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
17 deletions
+52
-17
docs/assets/css/bootstrap-responsive.css
docs/assets/css/bootstrap-responsive.css
+14
-10
less/responsive-utilities.less
less/responsive-utilities.less
+7
-7
less/tests/css-tests.html
less/tests/css-tests.html
+31
-0
No files found.
docs/assets/css/bootstrap-responsive.css
View file @
83846ba0
...
@@ -57,32 +57,36 @@
...
@@ -57,32 +57,36 @@
display
:
none
!important
;
display
:
none
!important
;
}
}
@media
(
min-width
:
768px
)
and
(
max-width
:
979px
)
{
.visible-desktop
{
.visible-tablet
{
display
:
inherit
!important
;
display
:
inherit
!important
;
}
}
.hidden-tablet
{
display
:
none
!important
;
@media
(
min-width
:
768px
)
and
(
max-width
:
979px
)
{
}
.hidden-desktop
{
.hidden-desktop
{
display
:
inherit
!important
;
display
:
inherit
!important
;
}
}
.visible-desktop
{
.visible-desktop
{
display
:
none
!important
;
display
:
none
!important
;
}
}
.visible-tablet
{
display
:
inherit
!important
;
}
.hidden-tablet
{
display
:
none
!important
;
}
}
}
@media
(
max-width
:
767px
)
{
@media
(
max-width
:
767px
)
{
.
visible-phone
{
.
hidden-desktop
{
display
:
inherit
!important
;
display
:
inherit
!important
;
}
}
.
hidden-phone
{
.
visible-desktop
{
display
:
none
!important
;
display
:
none
!important
;
}
}
.
hidden-desktop
{
.
visible-phone
{
display
:
inherit
!important
;
display
:
inherit
!important
;
}
}
.
visible-desktop
{
.
hidden-phone
{
display
:
none
!important
;
display
:
none
!important
;
}
}
}
}
...
...
less/responsive-utilities.less
View file @
83846ba0
...
@@ -15,29 +15,29 @@
...
@@ -15,29 +15,29 @@
// For desktops
// For desktops
.visible-phone { display: none !important; }
.visible-phone { display: none !important; }
.visible-tablet { display: none !important; }
.visible-tablet { display: none !important; }
.visible-desktop { } // Don't set initially
.hidden-phone { }
.hidden-phone { }
.hidden-tablet { }
.hidden-tablet { }
.hidden-desktop { display: none !important; }
.hidden-desktop { display: none !important; }
.visible-desktop { display: inherit !important; }
// Tablets & small desktops only
// Tablets & small desktops only
@media (min-width: 768px) and (max-width: 979px) {
@media (min-width: 768px) and (max-width: 979px) {
// Hide everything else
.hidden-desktop { display: inherit !important; }
.visible-desktop { display: none !important ; }
// Show
// Show
.visible-tablet { display: inherit !important; }
.visible-tablet { display: inherit !important; }
// Hide
// Hide
.hidden-tablet { display: none !important; }
.hidden-tablet { display: none !important; }
// Hide everything else
.hidden-desktop { display: inherit !important; }
.visible-desktop { display: none !important ; }
}
}
// Phones only
// Phones only
@media (max-width: 767px) {
@media (max-width: 767px) {
// Hide everything else
.hidden-desktop { display: inherit !important; }
.visible-desktop { display: none !important; }
// Show
// Show
.visible-phone { display: inherit !important; } // Use inherit to restore previous behavior
.visible-phone { display: inherit !important; } // Use inherit to restore previous behavior
// Hide
// Hide
.hidden-phone { display: none !important; }
.hidden-phone { display: none !important; }
// Hide everything else
.hidden-desktop { display: inherit !important; }
.visible-desktop { display: none !important; }
}
}
less/tests/css-tests.html
View file @
83846ba0
...
@@ -1019,6 +1019,37 @@
...
@@ -1019,6 +1019,37 @@
<!-- Responsive utility classes
================================================== -->
<div
class=
"page-header"
>
<h1>
Responsive utility classes
</h1>
</div>
<h4>
Visible on...
</h4>
<ul
class=
"responsive-utilities-test visible-on"
>
<li>
Phone
<span
class=
"visible-phone"
>
✔ Phone
</span></li>
<li>
Tablet
<span
class=
"visible-tablet"
>
✔ Tablet
</span></li>
<li>
Desktop
<span
class=
"visible-desktop"
>
✔ Desktop
</span></li>
</ul>
<ul
class=
"responsive-utilities-test visible-on"
>
<li>
Phone + Tablet
<span
class=
"visible-phone visible-tablet"
>
✔ Phone + Tablet
</span></li>
<li>
Tablet + Desktop
<span
class=
"visible-tablet visible-desktop"
>
✔ Tablet + Desktop
</span></li>
<li>
All
<span
class=
"visible-phone visible-tablet visible-desktop"
>
✔ All
</span></li>
</ul>
<h4>
Hidden on...
</h4>
<ul
class=
"responsive-utilities-test hidden-on"
>
<li>
Phone
<span
class=
"hidden-phone"
>
✔ Phone
</span></li>
<li>
Tablet
<span
class=
"hidden-tablet"
>
✔ Tablet
</span></li>
<li>
Desktop
<span
class=
"hidden-desktop"
>
✔ Desktop
</span></li>
</ul>
<ul
class=
"responsive-utilities-test hidden-on"
>
<li>
Phone + Tablet
<span
class=
"hidden-phone hidden-tablet"
>
✔ Phone + Tablet
</span></li>
<li>
Tablet + Desktop
<span
class=
"hidden-tablet hidden-desktop"
>
✔ Tablet + Desktop
</span></li>
<li>
All
<span
class=
"hidden-phone hidden-tablet hidden-desktop"
>
✔ All
</span></li>
</ul>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment