Skip to content
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

Align radio button group in forms on a single line #144

Open
rioksane opened this issue Oct 20, 2023 · 4 comments
Open

Align radio button group in forms on a single line #144

rioksane opened this issue Oct 20, 2023 · 4 comments
Labels
04 type: enhancement making existing stuff better 41 lvl: easy beginner skills needed, good for newbies 61 sites: visual/theming css/styling issues, UI, readability

Comments

@rioksane
Copy link
Collaborator

rioksane commented Oct 20, 2023

Align radio button group in forms on a single line. Now they are in single column and it looks bad and wastes space.

Example form: https://plone.org/foundation/plone-org-feeback-form

This css should fix it:

.radio-group {
display: inline-flex;
}

See example images:
This is the current situation:
Screenshot 2023-10-20 at 10 17 09

This is the preferred outcome:
Screenshot 2023-10-20 at 10 16 51

@rioksane rioksane added 04 type: enhancement making existing stuff better 41 lvl: easy beginner skills needed, good for newbies 61 sites: visual/theming css/styling issues, UI, readability labels Oct 20, 2023
@stevepiercy
Copy link
Contributor

If the radio button option is a long string of text, then the options would look bad inline.

I think that this should be an editor's choice to display both checkbox and radio button options either vertically or horizontally. Here is just such an example for a soccer referee send off report website I operate.

Screenshot 2023-10-20 at 4 26 11 AM

@rioksane
Copy link
Collaborator Author

@stevepiercy A very good point, you are correct. Option would be preferable, or some kind of automatic rule that changes the layout accordingly. But this is not so simple.

@stevepiercy
Copy link
Contributor

One other option would be to have two widgets, one for each desired alignment.

It depends on whether the HTML is different between the two options or whether it is only a CSS change.

@AnshulKahar2729
Copy link
Member

I think we can do that by checking the content length of radio buttons that we will decide. If is found above the certain length, we can show it in vertical direction else let it be in horizontal direction to look good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
04 type: enhancement making existing stuff better 41 lvl: easy beginner skills needed, good for newbies 61 sites: visual/theming css/styling issues, UI, readability
Projects
Status: Assess
Development

No branches or pull requests

4 participants