Skip to content

Commit 3f94d4f

Browse files
author
scottjehl
committed
Moved our own widget css layout toggles over to using standard media queries, rather than the classes we apply to the HTML element to simulate media queries.
1 parent b80689a commit 3f94d4f

File tree

7 files changed

+30
-17
lines changed

7 files changed

+30
-17
lines changed

experiments/ui-datepicker/jquery.ui.datepicker.mobile.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ div.hasDatepicker{ display: block; padding: 0; overflow: visible; margin: 8px 0
2727
.ui-datepicker-calendar th span, .ui-datepicker-calendar span.ui-state-default { opacity: .3; }
2828
.ui-datepicker-calendar td a { padding-top: .5em; padding-bottom: .5em; }
2929

30-
.min-width-480px div.hasDatepicker { width: 63%; display: inline-block; margin: 0; }
30+
@media all and (min-width: 450px){
31+
div.hasDatepicker { width: 63%; display: inline-block; margin: 0; }
32+
}

themes/default/jquery.mobile.controlgroup.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@
2424
.ui-controlgroup .ui-btn-icon-notext .ui-btn-inner { padding: 5px 6px 5px 5px; }
2525
*/
2626

27-
.min-width-480px .ui-controlgroup-label { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; }
28-
.min-width-480px .ui-controlgroup-controls { width: 60%; display: inline-block; }
27+
@media all and (min-width: 450px){
28+
.ui-controlgroup-label { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; }
29+
.ui-controlgroup-controls { width: 60%; display: inline-block; }
30+
}

themes/default/jquery.mobile.forms.fieldcontain.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55
*/
66
.ui-field-contain { background: none; padding: 1.5em 0; margin: 0; border-bottom-width: 1px; overflow: visible; }
77
.ui-field-contain:first-child { border-top-width: 0; }
8-
.min-width-480px .ui-field-contain { border-width: 0; padding: 0; margin: 1em 0; }
8+
@media all and (min-width: 450px){
9+
.ui-field-contain { border-width: 0; padding: 0; margin: 1em 0; }
10+
}

themes/default/jquery.mobile.forms.select.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ label.ui-select { font-size: 16px; line-height: 1.4; font-weight: normal; margi
2929
.ui-li.ui-selectmenu-placeholder { display: none; }
3030
.ui-selectmenu .ui-header .ui-title { margin: 0.6em 46px 0.8em; }
3131

32-
.min-width-480px label.ui-select { display: inline-block; width: 20%; margin: 0 2% 0 0; }
33-
.min-width-480px .ui-select { width: 60%; display: inline-block; }
32+
@media all and (min-width: 450px){
33+
label.ui-select { display: inline-block; width: 20%; margin: 0 2% 0 0; }
34+
.ui-select { width: 60%; display: inline-block; }
35+
}
3436

3537
/* when no placeholder is defined in a multiple select, the header height doesn't even extend past the close button. this shim's content in there */
3638
.ui-selectmenu .ui-header h1:after { content: '.'; visibility: hidden; }

themes/default/jquery.mobile.forms.slider.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
55
*/
66
label.ui-slider { display: block; }
7-
input.ui-slider-input, .min-width-480px input.ui-slider-input { display: inline-block; width: 50px; }
7+
input.ui-slider-input { display: inline-block; width: 50px; }
88
select.ui-slider-switch { display: none; }
99
div.ui-slider { position: relative; display: inline-block; overflow: visible; height: 15px; padding: 0; margin: 0 2% 0 20px; top: 4px; width: 66%; }
1010
a.ui-slider-handle { position: absolute; z-index: 10; top: 50%; width: 28px; height: 28px; margin-top: -15px; margin-left: -15px; }
1111
a.ui-slider-handle .ui-btn-inner { padding-left: 0; padding-right: 0; }
12-
.min-width-480px label.ui-slider { display: inline-block; width: 20%; margin: 0 2% 0 0; }
13-
.min-width-480px div.ui-slider { width: 45%; }
12+
@media all and (min-width: 480px){
13+
label.ui-slider { display: inline-block; width: 20%; margin: 0 2% 0 0; }
14+
div.ui-slider { width: 45%; }
15+
}
1416

1517
div.ui-slider-switch { height: 32px; overflow: hidden; margin-left: 0; }
1618
div.ui-slider-inneroffset { margin-left: 50%; position: absolute; top: 1px; height: 100%; width: 50%; }

themes/default/jquery.mobile.forms.textinput.css

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ textarea.ui-input-text { height: 50px; -webkit-transition: height 200ms linear;
1313
.ui-input-search .ui-input-clear-hidden { display: none; }
1414

1515
/* orientation adjustments - incomplete!*/
16-
.min-width-480px label.ui-input-text { vertical-align: top; }
17-
.min-width-480px label.ui-input-text { display: inline-block; width: 20%; margin: 0 2% 0 0; }
18-
.min-width-480px input.ui-input-text,
19-
.min-width-480px textarea.ui-input-text,
20-
.min-width-480px .ui-input-search { width: 60%; display: inline-block; }
21-
.min-width-480px .ui-input-search { width: 50%; }
22-
.min-width-480px .ui-input-search input.ui-input-text { width: 98%; /*echos rule from above*/ }
16+
@media all and (min-width: 450px){
17+
label.ui-input-text { vertical-align: top; display: inline-block; width: 20%; }
18+
input.ui-input-text,
19+
textarea.ui-input-text,
20+
.ui-input-search { width: 60%; display: inline-block; }
21+
.ui-input-search { width: 50%; }
22+
.ui-input-search input.ui-input-text { width: 98%; /*echos rule from above*/ }
23+
}

themes/default/jquery.mobile.listview.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid
2626
.ui-li-thumb, .ui-li-icon, .ui-li-content { float: left; margin-right: 10px; }
2727

2828
.ui-li-aside { float: right; width: 50%; text-align: right; margin: .3em 0; }
29-
.min-width-480px .ui-li-aside { width: 45%; }
29+
@media all and (min-width: 480px){
30+
.ui-li-aside { width: 45%; }
31+
}
3032
.ui-li-divider { cursor: default; }
3133
.ui-li-has-alt .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-alt { padding-right: 95px; }
3234
.ui-li-count { position: absolute; font-size: 11px; font-weight: bold; padding: .2em .5em; top: 50%; margin-top: -.9em; right: 38px; }

0 commit comments

Comments
 (0)