Problem/Motivation
This selector does not work if layout builder is used and you show several fields on content type.
.field:not(:last-child) {
margin-block-end: var(--sp2);
}
Steps to reproduce
- Create a few random fields on a content type.
- Enable layout builder for your content type.
- Reload the node
- bottom margin is gone
Proposed resolution
Add this selector to field.css
/**
* Content type with layout builder enabled
*/
.layout__region .block-layout-builder:not(:last-child) .field {
margin-block-end: var(--sp2);
}
Remaining tasks
Code review
User interface changes
Before fix
Image may be NSFW.
Clik here to view.
After fix
Image may be NSFW.
Clik here to view.
API changes
None
Data model changes
None