Thank you for your work NarendraR. I created a git branch out of it.
The functionality of Status Message Close depends on certain CSS IDs and classes. The following JS lines remove the wrapper DIV if there is only one message left in order to remove all extra padding and margin if there is no message left.
var messages_left = $('#messages .section').children().size();
if (messages_left === 1) {
$('#messages').remove();
}
The CSS id #messages seems to be deprecated. Bartik in Drupal 8 uses a class .messages__wrapper instead.
var messages_left = $('.messages__wrapper).children().size();
if (messages_left === 1) {
$('.messages__wrapper').remove();
}
Comments
Comment #4
derjochenmeyer commentedThank you for your work NarendraR. I created a git branch out of it.
The functionality of Status Message Close depends on certain CSS IDs and classes. The following JS lines remove the wrapper DIV if there is only one message left in order to remove all extra padding and margin if there is no message left.
The CSS id
#messagesseems to be deprecated. Bartik in Drupal 8 uses a class.messages__wrapperinstead.Comment #6
derjochenmeyer commentedAdd 8.x-1.x-dev
Comment #7
derjochenmeyer commentedComment #8
derjochenmeyer commentedDrupal 8.x-1.0 version released.
Thanks and credits to Narendra Rathore (NarendraR) for porting Status Message Close to Drupal 8.