-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix form field margins #3058
Fix form field margins #3058
Conversation
@@ -8,6 +8,10 @@ | |||
margin: 0; | |||
padding: 0; | |||
border: 0; | |||
|
|||
.form-field { | |||
margin-block: var(--pr-t-spacings-50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the last block always have a bottom-margin?
Actually, do we always want block margins here? For example, if we use a vertical flex container with gap?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, the container is always a .form-fieldset
, and its display shouldn't move.
@@ -8,6 +8,10 @@ | |||
margin: 0; | |||
padding: 0; | |||
border: 0; | |||
|
|||
.form-field { | |||
margin-block: var(--pr-t-spacings-50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applying only a margin bottom on .formLabel
and .form-field
wouldn't be cleaner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would work too, but it affects two elements instead of one.
The margins merge here, is that what's bothering you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wonder if margins collapse works well on every browsers
Description
Before:
After: