Problem/Motivation
Webforms flex rules that define form-group bottom margin are wrong because flex is disabling margin collapsing. We should define the bottom margin on the parent webform-flexbox element and also reset the top margin for it.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | interdiff-3125164-4-7.txt | 585 bytes | sasanikolic |
| #7 | improve-webforms-flexbox-rules-3125164-7.patch | 2.29 KB | sasanikolic |
| #4 | improve-webforms-flexbox-rules-3125164-4.patch | 2.39 KB | pivica |
| #4 | interdiff-3125164-3-4.txt | 1007 bytes | pivica |
Comments
Comment #2
pivica commentedHere is a patch.
Comment #3
pivica commentedHmm, it seems we can additionally simplify stuff here now and just reset bottom margin to zero - doing a negative reset is not working properly any more.
Also when the label is hidden we need to align flex to bottom.
Here is a new patch.
Comment #4
pivica commentedFound couple of additional edge cases where margin collapsing was not working properly (fieldset and details), here is update.
Comment #5
sasanikolic commentedWe can't do this by default. The issue is that with this we override the default "Top (flex-start)" alignment and then this setting becomes redundant.
This becomes visible when we have two not-equal columns.
Attaching a screenshot and an exported webform with the issue visible.
Comment #6
sasanikolic commentedWe did this to align the items in one row to the bottom. In that case we can use the Flex align "Bottom (flex-end)" webform flex setting. So, I think we should revert this default bottom alignment definition.
Attaching the same webform with the one row example.
Comment #7
sasanikolic commentedHere is the proposed patch. What do you think @pivica? I know this would involve changing the webforms manually, but I really don't think we should alter the default webform flex behavior.
Comment #8
sasanikolic commentedForgot the interdiff.
Comment #9
pivica commentedChecked, tested changes and yes this make total sense, i've missed that webforms have 'Align items' options.
Comment #11
pivica commentedCommitted.