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

Check box is not center aligned in form #823

Closed
hajanajubudeen88 opened this issue Jun 19, 2019 · 4 comments
Closed

Check box is not center aligned in form #823

hajanajubudeen88 opened this issue Jun 19, 2019 · 4 comments
Labels
lang/css Anything involving CSS type/bug Any issue which is a bug or PR which fixes a bug
Milestone

Comments

@hajanajubudeen88
Copy link

Bug Report

In the fiddle i created four fields form and in that 3 text field and one check box, in that checkbox is not aligned properly, below the details to reproduce the issue

Steps to reproduce

  1. I created four fields form with 3 text field with one checkbox
  2. All the four fields have the header label like First Name, Last Name etc.,
  3. Whenever i created the checkbox with header label ( 'Check Box' ) the alignment is collapsed

checkbox

  1. if i remove the header label( Check Box ), its working properly with center alignment

properCenterAlign

Expected result

expectedResult

( OR )

expectedResult1

Actual result

checkbox

Please help me to fix the issue with label and center aligned check box, Thanks

Testcase

https://jsfiddle.net/hajanajubudeen88/n092dprh/11/

@maidzen
Copy link
Contributor

maidzen commented Jun 19, 2019

add this to your css

.ui.form .fields:not(.grouped):not(.inline) .field:not(:only-child) .ui.checkbox  {
  margin-top: 0.8em;
}

@GammaGames
Copy link
Contributor

GammaGames commented Jun 19, 2019

When I added it I thought people would be using the label inside the .ui.checkbox div because it's required to make the checkbox show up. Maybe we'd want to add an exception for a fitted checkbox? For example:

.ui.form .fields:not(.grouped):not(.inline) .field:not(:only-child) .ui.fitted.checkbox {
  margin-top: 0.7rem;
}

I'm not sure, because this seems like a somewhat small exception.

Here's an updated fiddle https://jsfiddle.net/Luhzqgn9/

@lubber-de lubber-de added type/bug Any issue which is a bug or PR which fixes a bug lang/css Anything involving CSS labels Jun 19, 2019
@lubber-de
Copy link
Member

With slight adjustments of @GammaGames ' fiddle it doesn't even need the fitted variant of checkbox, so an additional label beside the checkbox is still working

.ui.form .fields:not(.grouped):not(.inline) .field:not(:only-child) label + .ui.checkbox {
  margin-top: 0.7rem;
}

See https://jsfiddle.net/4poqja0t/

Who volunteers for a PR ? 😉

@lubber-de lubber-de added this to the 2.7.x milestone Jun 19, 2019
@lubber-de lubber-de modified the milestones: 2.7.x, 2.7.7 Jun 20, 2019
@hajanajubudeen88
Copy link
Author

@lubber-de , @GammaGames , @maidzen Its working Thanks

y0hami pushed a commit that referenced this issue Jul 10, 2019
@lubber-de lubber-de added the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Jul 10, 2019
@lubber-de lubber-de removed the tag/next-release/nightly Any issue which has a corresponding PR which has been merged and is available in the nightly build label Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/css Anything involving CSS type/bug Any issue which is a bug or PR which fixes a bug
Projects
None yet
Development

No branches or pull requests

4 participants