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.
This is a little nit picky, but being less specific (where possible) in general allows for more flexibility. I came across this one today, manually adding a <div class="messages status">...</div>
to a node, and realized it wasn't styled. Sometimes these messages are printed in other places.
#messages {
padding:20px 0 5px;
}
#messages div.status {
background: #FCF6BE;
border:1px solid #BBBBBB;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
margin:0 auto;
padding:15px;
width:900px;
}
#messages div.error {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
margin:20px auto;
padding:20px;
width:900px;
}
Would be better as:
#messages {
padding: 20px 0 5px;
width: 900px;
}
div.messages {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
div.status {
background: #FCF6BE;
border: 1px solid #BBBBBB;
margin: 0 auto;
padding: 15px;
}
div.error {
margin: 20px auto;
padding: 20px;
}
Also "warning" messages don't have a Bartik style (could be by design, not sure).
Comment | File | Size | Author |
---|---|---|---|
#14 | removemessageswidth.patch | 455 bytes | yoroy |
#2 | drupal-messages-sky.png | 124.5 KB | Jacine |
Comments
Comment #1
jensimmons CreditAttribution: jensimmons commentedI just made this change and committed it to the master at GitHub.
There's no warning message, and there should be. Suggestions?
Comment #2
JacineWell, I kinda suck at design, but I can share what I am doing in the D7 version of my own theme. You are welcome to steal it if you want.
Comment #3
willmoy CreditAttribution: willmoy commentedChanging title to reflect the fact that what the thread was about was done.
Now we have a bartik project, moving there. Marking as critical because it seems necessary for core inclusion.
Comment #4
yoroy CreditAttribution: yoroy commentedYou could use http://drupal.org/node/193482#comment-1250616
#193482: Styling status messages in system.css
Comment #5
JacineYes, those would be a lot better. Nice job :D
Comment #6
theresaanna CreditAttribution: theresaanna commentedI'm taking a stab at implementing those gorgeous error messages. :)
Looks straightforward so far, except that I can't find an icon that exists in D7 core to use in place of the blue icon.
yoroy, or anyone else - any ideas? Are these icons open source and available to be added into the theme?
Comment #7
emmajane CreditAttribution: emmajane commentedIn theory if these messages get into core this issue becomes irrelevant because the default core style will be used. I think we should mark this issue as a duplicate of #193482: Styling status messages in system.css and focus our energy on issues that are unique to Bartik. If you agree, please go ahead and mark as dupe. :)
Comment #8
emmajane CreditAttribution: emmajane commentedPlease review #7 and mark this issue as duplicate if you agree this is not a Bartik-specific issue.
Comment #9
yoroy CreditAttribution: yoroy commentedYou're absolutely right. I'll go push the one for core again. Worry about Bartik custom later if at all :)
Comment #10
yoroy CreditAttribution: yoroy commentedWeeeelllll… lets keep it around and let jen make a call, later.
Comment #11
jensimmons CreditAttribution: jensimmons commentedI'm all for use the core messages! Let's pull any custom message code out of Bartik that should come out now. Yes?
Comment #12
JacineI removed the custom Bartik styles and committed, but left the following:
I think we should remove the width here. What do you think?
Comment #13
emmajane CreditAttribution: emmajane commentedAgreed with removing the width. It's one of the fixes I had to make in the admin CSS (adjusting the width to 90% instead of 900px to have it fit in the overlay on narrower page sizes).
Comment #14
yoroy CreditAttribution: yoroy commenteduntested, but here's a patch
Comment #15
JacineGreat! Thank you ;) Committed.