[Form] checkbox doesn't respect form size
[Form] checkbox doesn't respect form size
Steps to reproduce
- Define a .ui.form of a given size, ex.: .ui.tiny.form
- 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
Confirmed.
❌ checkbox ✔️ input ✔️ textarea ✔️ dropdown (select) ✔️ message
Only checkbox does not respect the size of parent form.
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/
Fixed by https://github.com/fomantic/Fomantic-UI/pull/886 See your adjusted jsfiddle here: https://jsfiddle.net/vkjzudc6/