Fomantic-UI icon indicating copy to clipboard operation
Fomantic-UI copied to clipboard

[Form] checkbox doesn't respect form size

Open donaggio opened this issue 7 years ago • 3 comments

[Form] checkbox doesn't respect form size

Steps to reproduce

  1. Define a .ui.form of a given size, ex.: .ui.tiny.form
  2. Add an input and a checkbox to the form

Expected result

All fields inside the form should inherit their font-size from the size variation of the parent form itself

Actual result

It works for input fields but not for checkboxes

Testcase

https://jsfiddle.net/a1sxk7du/

Version

2.7.4

donaggio avatar Apr 12 '19 09:04 donaggio

Confirmed.

❌ checkbox ✔️ input ✔️ textarea ✔️ dropdown (select) ✔️ message

Only checkbox does not respect the size of parent form.

exoego avatar Apr 12 '19 10:04 exoego

Related SUI issue: https://github.com/Semantic-Org/Semantic-UI/issues/3941 Jack said, it is using px instead of em because of rounding issues... 🤔 Could not really reproduce in a short test. Anyway, leaving the checkbox as it is (by 17px width/height) and adjust by transform:scale() seems to easily do the job without dealing with top-margins (which would be necessary if done only via width/height adjustments) Just by scaling, the checkbox always stays centered to the label text... Here is some testing: https://jsfiddle.net/mygbzvfc/

lubber-de avatar Apr 12 '19 13:04 lubber-de

Fixed by https://github.com/fomantic/Fomantic-UI/pull/886 See your adjusted jsfiddle here: https://jsfiddle.net/vkjzudc6/

lubber-de avatar Jul 19 '19 22:07 lubber-de