Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 4d677f3

Browse files
Flipswitch: Override rules for fieldcontainers inside popups
Fixes gh-7174
1 parent b0fcf39 commit 4d677f3

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

css/structure/jquery.mobile.forms.flipswitch.css

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,17 @@
6565
padding: 1px;
6666
text-indent: 1em; /* Override this to center text if you use a label other than "off" */
6767
}
68-
@media (min-width: 28em) {
69-
.ui-field-contain > label + .ui-flipswitch {
70-
display: inline-block;
71-
width: 5.875em; /* If you override the width for .ui-flipswitch you should repeat the same value here */
72-
-webkit-box-sizing: content-box;
73-
-moz-box-sizing: content-box;
74-
-ms-box-sizing: content-box;
75-
box-sizing: content-box;
76-
}
77-
.ui-field-contain .ui-flipswitch.ui-flipswitch-active {
78-
width: 1.875em;
79-
}
80-
}
68+
/* Override field container CSS to prevent the flipswitch from becomming full width */
69+
html .ui-field-contain > label + .ui-flipswitch,
70+
html .ui-popup .ui-field-contain > label + .ui-flipswitch {
71+
display: inline-block;
72+
width: 5.875em; /* If you override the width for .ui-flipswitch you should repeat the same value here */
73+
-webkit-box-sizing: content-box;
74+
-moz-box-sizing: content-box;
75+
-ms-box-sizing: content-box;
76+
box-sizing: content-box;
77+
}
78+
.ui-field-contain .ui-flipswitch.ui-flipswitch-active,
79+
.ui-popup .ui-field-contain .ui-flipswitch.ui-flipswitch-active {
80+
width: 1.875em;
81+
}

0 commit comments

Comments
 (0)