-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Style improvement of radio form elements #12736
Conversation
Radio inputs are too close to their labels, I think this simple improvement would be useful, as commented here: https://lab.civicrm.org/dev/core/issues/355
(Standard links)
|
@calbasi I like the intent here and since it's a fussy change I'm feeling emboldened to make a fussy request. In the new version shown in gitlab image, there is more space between radio button and text associated with it than between the text and the next button. Could you maybe decrease the spacing between button and its text, and/or add spacing after text before next radio button? Also, could you provide an image showing relative space between radio button and text after it that also includes other widgets for comparison, like a checkbox? Thanks!! |
IMO a better improvement would be to wrap each input+label combo in a span or a div. It really makes styling difficult when all form elements and labels are siblings, especially because when overflowing to multiple lines the label might end up on a different line than the input. |
+1 to @colemanw 's suggestions. But I'd also like the styling itself to change as mentioned, and for there to be a review of how this change to radio button spacing will look in comparison to checkbox spacing. |
Hi @JoeMurray, I agree with you. Here could be an improved code:
I attack some images with the before/after screenshots. And I agree too with @colemanw , a necessary improvement would be pairs of input/label have a parent warp element, like:
What about these 2 changes? I can add the first to the pull request, but I don't know where html output of radio/checkboxes is generated (but I'd like to learn about it) |
@calbasi That html output is generated from within the HTML/QuickForm code which lives in the civicrm_packages repo |
@colemanw where are you at on this? |
Then, what do you prefer? We could apply this first improvement, and then go for the HTML commit? Or do you prefer we start to work with HTML while this is in stand by? |
The css change is simple so I think this should be merged before any changes to HTML, which will be more complex and should be done in a separate PR. |
I second the suggestion of accepting the css as an immediate cleanup. Regarding the markup changes I'd say yes, but should we be aiming to have a styleguide for front-end form elements and then reference that? |
So based on advice from @mattwire & @vingle I believe this is mergeable and I am doing so. I understand it's prefereable to also add a margin right & if that PR emerges it can also be merged. I strongly agree that there should be documentation (in gitlab or docs ) on what we are working towards in terms of markup clean up because we don't have anything to assess these proposals against at the moment |
Radio inputs are too close to their labels, I think this simple improvement would be useful, as commented here:
https://lab.civicrm.org/dev/core/issues/355