Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Working on a couple sites I've noticed the core omega styling doesn't adapt the basic contact form for mobile styling. Adding in the following seems to keep the basic styling in place but allows it to adapt well to the mobile screen sizes.
.contact-form .form-item {
float: left;
}
.contact-form .form-text, .contact-form .form-select {
width: 100%;
}
.contact-form .form-actions {
float: left;
margin-left: 40px;
}
Himerus - what do you think about including this into omega's optional css to keep some of the base styling consistent with responsive?
Comment | File | Size | Author |
---|---|---|---|
#10 | omega-contact_form3-1481234.patch | 886 bytes | Cellar Door |
#8 | omega-contact_form2-1481234.patch | 814 bytes | Cellar Door |
#6 | omega-contact_form-1481234.patch | 829 bytes | Cellar Door |
Comments
Comment #1
Cellar Door CreditAttribution: Cellar Door commentedForgot to add the clear to global.css it should go:
In default.css it should then have:
IMHO this makes the contact form much more attractive as it uses up all the available space, and stays responsive on mobile.
Comment #2
Cellar Door CreditAttribution: Cellar Door commentedAnd just for commonality I just found this change in the form-action to match the rest in margin.
in global.css:
So to make it less confusing (which I'm sure it is after all this)
In global.css:
in default.css
Alright, after confusing even myself I'm going to stop for the night. Let me know what y'all think about the styling.
Comment #3
Cellar Door CreditAttribution: Cellar Door commentedAnd now for the User login form:
global.css
default.css
Simple but it makes these work much better on mobile.
Comment #4
Cellar Door CreditAttribution: Cellar Door commentedShould this be in 3.2? Not sure if it will effect sites already in existence but will help fix ones that haven't addressed it.
Comment #5
markwk CreditAttribution: markwk commentedi have the same issue and I've had it on other projects. To be honest, you should update the original issue to reflect your solution or post a patch.
Comment #6
Cellar Door CreditAttribution: Cellar Door commentedLet's see if this passes testing.... I know a few haven't lately. I changed the core Omega CSS file omega-forms.css and added a media query for it to work w/ the standard formats. This should allow for most use cases and since it's in the omega-forms.css its easily disabled and/or overwritten.
Comment #7
Cellar Door CreditAttribution: Cellar Door commentedforgot to update the status for testing purposes
Comment #8
Cellar Door CreditAttribution: Cellar Door commentedjerryitt found that I had a stray max-width: in there from testing. I've removed it and re-patched.
Comment #9
jerryitt CreditAttribution: jerryitt commented#8 apply's cleanly to 7.x-3.x-dev
Looks much better than the default styling and is easy to override if needed.
Comment #10
Cellar Door CreditAttribution: Cellar Door commentedAnother fix for a clear issue on some various mobile screen widths
Comment #11
jerryitt CreditAttribution: jerryitt commentedpatch #10 is working and fixes the clear:left; issue that was in #8.
Comment #12
markwk CreditAttribution: markwk commentedCool changes + Nice additions.