You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
It's understandable why this happens (IMO because it's very likely, that popups are not wide enough and we only have media queries that query for viewport size, but not for parent container width), but I miss a possibility to have horizontal forms anyway. If authors are sure, their horizontal forms will fit, why not giving them the possibilty?
My suggestion would be to have a data-attribute on fieldcontainers that ends up in an additional class on the fieldcontainer which doesn't apply the CSS rules from above.
Thanks for this suggestion. I agree it would be nice if we could leave this up to the developer.
Downside of your solution is that it uses JS to add a class, while we are actually working on reducing this in 1.4 to improve performance. Another problem is the :not() selector which isn't supported on IE8. Media queries aren't supported either on IE8, but when people use a polyfill like Respond.js they probably expect things to work.
What I have in mind for field containers is to do the responsiveness the other way around and use class ui-responsive, the same way as we do for responsive grids. The labels and form elements sit next to eachother by default and we use the following CSS to stack them at small screens:
Or maybe also .ui-responsive .ui-field-contain so you only have to add the ui-responsive class to the form container and not each field container in the form.
The rule to apply this at all viewport widths for field containers in popups can be done the same way. That would resolve the problem you described, because you can just omit class ui-responsive.
Using an opt-in class and doing it the other way around also makes it a lot easier if you want to use a different breakpoint. Obvious downside is that you have to add that class to your markup if you want things to stay the same as they are now.
@toddparker - We discussed this earlier (#5276). What do you think?
Closing as feature request. We are going to update the roadmap. If we decide to implement the feature we will set a specific milestone. The ticket will be re-opened when we are going to work on implementing the feature.
is there an easy workaround for us that need this functionality now? certainly for the tablet pages I am making (in landascape mode) it makes no sense to stack the form elements vertically
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
jquery.mobile.popup.css forces all forms in popups to be vertical forms (labels can not be in one line with the corresponding input fields):
It's understandable why this happens (IMO because it's very likely, that popups are not wide enough and we only have media queries that query for viewport size, but not for parent container width), but I miss a possibility to have horizontal forms anyway. If authors are sure, their horizontal forms will fit, why not giving them the possibilty?
My suggestion would be to have a
data
-attribute on fieldcontainers that ends up in an additional class on the fieldcontainer which doesn't apply the CSS rules from above.An possible example:
data-type="horizontal"
would add a.ui-field-contain-horizontal
class and the CSS only needs additional:not()
selectors:What do you think? I would also be glad to help you out and submit a pull request if you people think the idea is good.
The text was updated successfully, but these errors were encountered: