-
-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/user-interface#35 civicrm.css: add support for mobile devices on forms #19968
Conversation
(Standard links)
|
@vingle @artfulrobot any opinions? |
Thumbs up from me. It's a faff creating local hacks for every site. Something that's held me back from making a PR in the past is civicrm.css hasn't until now had any breakpoints set. So while I'd definitely support That said, it still seems a good improvement. It'll be easier for someone to create an override specific to their front-end theme's breakpoint as they can just tweak the media query, and some figure for width has to be used. |
Thanks @vingle - I've added merge ready based on your response. If nothing else comes up in the next couple of days we can merge |
Not a blocker, but I just want to note that different themes have different breakpoints, and I've already made headway on accommodating those differences during the KAM/SmartMenus project. For the menubar css, breakpoint variables are defined server-side according to CMS and then variable placeholders in the css file get replaced by asset-builder. I think we should reuse and keep building on that system when introducing other breakpoint queries into our stylesheets. |
Looks like it solves an immediate problem for mobile, so good from me. (almost a shame to choose to maintain |
@colemanw Would you be OK with me adding a "todo" comment in the code, so that if this opens a can of worms for people who want to tweak it, they will know where to look? I had a quick look at the |
That's fine. |
👍 done thanks @vingle @artfulrobot @colemanw for the feedback. |
Overview
CSS tweak so that CiviCRM forms are less hostile to use on mobile devices (https://en.wikipedia.org/wiki/Mobile_device).
https://lab.civicrm.org/dev/user-interface/-/issues/35
Before
After
Technical Details
Added media queries (https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries).
The impact should be minor, assuming 99.99999% people override this on their custom CSS.
Comments
The above screenshots are from the WordPress wpmaster test site (https://wpmaster.demo.civicrm.org/contribution-page/), which uses the "twentythirteen" theme. The default Drupal7 theme does not support mobile devices (I guess mobile was fairly new in 2011, with the arrival of 4G), but Drupal9 seems cutting edge fortunately does (https://d9-master.demo.civicrm.org/civicrm/contribute/transact?id=1).