Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Because .messages-list uses bottom padding, it takes away the ability to collapse margins with elements beneath it. For example, on admin/config/media/file-system, when a message is present, there is more space between the message and the page content due to the combination of bottom padding and the margin-top of the first .form-item
Comment | File | Size | Author |
---|---|---|---|
#9 | interdiff.txt | 372 bytes | lauriii |
#6 | interdiff.3082694.4-6.txt | 497 bytes | fhaeberle |
#6 | 3082694-6.claro_.Extra-space-between-message-and-content-when-content-has-elements-with-margintop.patch | 463 bytes | fhaeberle |
| |||
#5 | space_beween_content_and_message.PNG | 9.45 KB | pzajacz |
#4 | space_beween_content_and_message.PNG | 9.45 KB | pzajacz |
Comments
Comment #2
fhaeberleComment #3
huzookaComment #4
pzajacz CreditAttribution: pzajacz at Brainsum commentedI removed the padding-bottom from message-list, so it fixes the bug, but it needs more accurate testing on other admin pages.
Comment #5
pzajacz CreditAttribution: pzajacz at Brainsum commentedComment #6
fhaeberle@pzajacz Thank you very much for your contribution! I reviewed this and simply removing the padding isn't enough because it's needed and defined here in the design spec.
Because this is implemented with padding, it (the margin) doesn't collapse and this results in the adding of the padding to the margin of the element beneath it as @bnjmnm describes in the issue summary. I also guess that this bottom spacing never works for js added messages because it was missed in the implementation. I tried to fix both problems :)
Comment #9
lauriiiThank you! Looks good. I added a todo referencing to #3078400: Remove hard coded messages markup and attached interdiff for that.