Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
CSS
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Mar 2014 at 12:14 UTC
Updated:
27 Sep 2014 at 14:31 UTC
Jump to comment: Most recent, Most recent file


.png)
Comments
Comment #1
cs_shadow commentedAttached is a patch for the same. Though, need to check whether this intended.
Comment #2
longwaveThis patch only seems to affect Seven, so moving to that component.
Comment #3
lewisnymanThis patch only seems to modify the horizontal alignment but the report suggests we need to modify the vertical alignment?
Comment #4
cs_shadow commentedOh, I overlooked vertical alignment part, my bad. I'll upload a patch for the same shortly.
Comment #5
Crisz commentedActually this issue also happens when Bartik is the main admin theme, this patch should address the problem in both Bartik and Seven. =)
Comment #6
Crisz commentedComment #8
Crisz commentedOh, formatting error, sorry about that, this one should be fine.
Comment #9
anksy commentedThe patch works fine and solves all the listed issues.
Comment #10
lokapujyawhy the new line on line 156?
Comment #11
Crisz commentedI probably accidently added that line while editing the file, this following patch doesn't have this issue. Thanks for noticing.
Comment #13
lokapujyaPlease add a space between .messages and {
Comment #14
Crisz commentedComment #15
Crisz commentedComment #16
anksy commented#10 Yeah I missed the extra line in the patch. But this patch looks good.I can't find any errors.
Comment #17
lokapujyaComment #18
Anonymous (not verified) commentedLast patch looks good to me. Solves the problem
Comment #19
sqndr commentedDon't know why you should add this. Doesn't seem like this is part of the solution? I removed these lined and created a new patch.
Comment #20
lewisnymanThis is looking better! Thanks.
Comment #21
webchickWould love an "after" screenshot here. Also, tentatively tagging "Needs accessibility review," because I thought that the reason we put the icon right up next to the *top* of a very long error message was for accessibility, though I'm not totally sure about that.
Comment #22
rob3000 commentedjust tested the patch and added screenshots as per webchick's request in
#21.
Comment #23
Crisz commentedThe reason why this piece of code is there is because without it, the last example given in the description will continue wrong.
Comment #24
Crisz commentedThe following screenshots are the result of the patch 14 that I previously submitted.
Comment #25
Crisz commentedComment #26
Master_Hipsto commentedPatch number 19 and new drupal version that implemented new icons fixed this issue.
Comment #27
Crisz commentedNo, it does not fix.
To reproduce this, just run the update script locally with no internet connection. Tested on the latest Drupal 8 dev version.
Comment #28
Crisz commentedComment #29
mcjim commentedThe reason why it's not working with the AJAX error is because the message is wrapped in
<pre>, which has it's own padding and margin depending on the theme (Bartik has a different background colour for it, too).There doesn't appear to be specific styling for
.messages pre: maybe that's what we need here?As an aside, I created a sandbox module to deliberately create an AJAX error: https://drupal.org/sandbox/mcjim/2227053
Going to /error tries to run a batch which fails, giving a nice error to work with :-)
Comment #30
lauriiiComment #31
lauriiiAdded separated style for .messages pre
Comment #32
lauriiiComment #33
mcjim commentedComment #34
mcjim commentedPatch in #31 is looking good, though there's still mis-alignment until #2220905: Misaligned messages status is resolved.
The only issue is the AJAX error pages, which output the messages to the content rather than to #console, so don't have margin on the left.
Comment #35
lauriiiDo you have any example where the left margin issue could be tested?
Comment #36
mcjim commented@lauriii I pushed a sandbox project just for this: https://drupal.org/sandbox/mcjim/2227053
You'll need to clone it: https://drupal.org/project/2227053/git-instructions
It's just a module: you can put it in /modules then enable it. Then you can visit http://your-site/error in your browser to trigger an AJAX error.
Comment #37
lauriiiThanks for the module. Whats the problem we are discussing? I think I didn't quite get that.
Comment #38
sqndr commentedmcjim++
Thanks for the module!
Comment #39
lauriiiComment #40
lauriiiAnd the patch..
Comment #41
mcjim commentedThanks, @lauriii, patch is almost there!
A couple of suggestions:
Icon position (possibly controversial!):
In system.theme.css, change line 517 from
background: no-repeat 10px 18px;tobackground: no-repeat 10px 17px;. I think the icons need to go up a teeny tiny bit, and this looks right to me.#console margin on node/add pages
Change
margin: 0 2em;tomargin: 0 0 0 8px;on line 1503.This fixes the extra, unnecessary margin on the node/add pages introduced in #2095275: Space above add content form with no overlay
Remove the extra 8px margin from messages--status
Perhaps we could do that in this patch?
Comment #42
mcjim commentedComment #43
lauriiiComment #45
lauriii43: misalligned_icons_in_drupal_8-2213583-43.patch queued for re-testing.
Comment #46
lauriiiComment #47
mathieso commentedError message icon looks ok on Firefox/Ubuntu.
But is the check mark for the status message too low?
Disabling a CSS line fixes it:
This is what it looks like with the CSS line disabled:
Comment #48
mcjim commented@mathieso I agree, I think the check mark is better higher up.
@lauriii Otherwise, I think the patch is good! :-)
Comment #49
droplet commentedIt seems only 2 lines related to this issue. Please focus on it only.
Comment #50
mcjim commentedOK. We can restrict this issue to the misaligned icons only and create a new issue for the misaligned messages themselves or just update the issue summary to reflect what's in the patch. Happy to do either, as long as we end up with nicely aligned messages :-)
Comment #51
rajendar reddy commentedI think we can remove separate position for status messages
remaining things looks good.
Comment #52
rajendar reddy commentedComment #53
mgiffordI can't see an accessibility problem with this patch. What needs to be done to RTBC it?
Comment #54
lewisnymanI think we're going to need before/after screenshots in Seven/Bartik/Stark to get this committed. The changes are very subtle.
Comment #55
lewisnymanComment #56
Anonymous (not verified) commentedI've used Wraith to get some screenshots of before/after. It is subtle, but it's there!
Pop the html in the attached zip into your browser to have a gander.
Comment #57
Sumit kumar commented51: drupal8-misalligned_icons_in_drupal_8-2213583-51.patch queued for re-testing.
Comment #59
amitgoyal commentedPlease review revised patch as patch in #51 no longer applies in the current code.
Comment #60
gippy commentedPatch 59 successfully resolved the problem on the following browsers: Chrome (mac), Safari (mac), Opera (mac), Firefox (mac) and Internet Explorer 8 (Crossover on Mac).
Comment #61
gippy commentedComment #62
gippy commentedComment #63
lauriiiComment #64
alexpottWhat about rtl?
Comment #65
lauriiiAdded RTL support. Some pictures here:
Comment #68
damien tournoud commentedComment #69
lewisnymanComment #70
lauriiiComment #71
lauriiiComment #72
kimkl91c commentedComment #73
esod commentedComment #74
esod commentedRerolled the patch. Here are before and after screen shots.
Before:

After:

Comment #75
mgiffordLooks like the spacing is off for:
I'm also curious about the changes to
[dir="rtl"] .messages--status {I'd just like some comment on that as it's a change from #70 and I don't know why.
Comment #76
lauriiiThe reason for the changes to
[dir="rtl"] .messages--status {is this:Before:

After:

Comment #77
lewisnymanThanks for the detailed screenshots. The code looks good, I have one question:
Is there a good reason to include the .content class in the selector?
Comment #78
zserno commentedFixed indentation according to #75.
Comment #79
zserno commentedTested latest patch without the .content class in the selector according to #77


Before:
After:
Comment #80
thamasFYI I created a related issue: #2321121: Remove #console
Comment #81
lewisnymanThanks, really close with this I think.
I found a little bit of weirdness on the status messssages when testing ltr->rtl

The background position styling for messages--status doesn't kick in but it looks fine
But for RTL it does and it looks wrong.
Maybe we just need to delete the background position styling for messages--status?
Comment #82
thamasComment #83
jamesquinton commentedI've removed the background position - looks good to me.
I did notice however that the arrows on the expandable detail elements does get quite close to the text - screenshot attached.
Comment #84
jamesquinton commentedSwapped #console to .messages. As said in #2321121, this appears to not cause any further issues.
Comment #85
gábor hojtsy#2321121: Remove #console was closed as duplicate.
Comment #86
thamas@jamesquinton, @Gábor Hojtsy - closing #2321121: Remove #console means that removing #console from the twig file should be also done here.
Comment #87
lewisnymanWe don't need a blank line here.
What is this code for? Why do we override .messages when inside .content? Is it for the node creation page?
Comment #88
lauriiiI didn't find any case where
.content .messageswould happen. I also removed#consolein this patch.Comment #89
pakmanlhAfter apply the misalligned_icons_in-2213583-83.patch it looks nice, here I attached an screenshot.
Cheers!
Comment #90
g-raph commentedI applied patch from #88 and everything looks ok. See screenshots before and after. Good work!
Comment #91
longwaveIs the
ifstatement redundant now?ie.
could become just
Comment #92
webchickGood question.
Comment #93
sqndr commentedHm. The
ifis usedto print a markup container if there is a value to be printed inside it(from the Twig coding standards).Why is the div removed? Should this be something like:
<div class="messages">?Comment #94
sqndr commentedSo - here's a quick update.
Comment #95
sqndr commentedRight, forget about #94. The
{messages}doesn't need adivaround it, because it's added in a preprocess. The patch from #88 seems to be fine.Comment #91 is correct. We can remove the if. I've attached a patch, and tested this patch with @Laurii at Frontend United in Copenhagen. :)
Comment #96
lauriiiTested this manually and it works. Fixes the issue pointed by webchick in comment #92
Comment #97
herom commentedMinor nitpick:
Extra indentation.
Comment #98
pushpinderchauhan commentedJust removed the extra space as mentioned by @herom in #97. Again pushing to Need Review to ensure get passed through Test Bot.
Comment #99
lauriiiComment #100
herom commentedok. back to RTBC.
Comment #101
droplet commenteddefault background position is '10px 17px'. RTL is diff.
Really don't like use percentage offset value. It has bad result on smaller screen width. Why not use background-origin?? ( http://caniuse.com/#search=background-origin )
Or apply the CSS rule to inner DIV + padding. eg:
Comment #102
gábor hojtsyAnybody interested to move this forward? I came from #2318381: Message not styled properly on interface translation page which was postponed on #2321121: Remove #console which was marked as duplicate of this one. So for the sake of these things happening, now that it is all bundled up in this bigger issue, how do we ensure it happens? :)
Comment #103
herom commentedHere we go.
Needed a reroll after #2321505: Split Seven's style.css into SMACSS categories, which deleted the seven
style.css, and moved the#consolestyling to a separate file. So, there are two interdiffs: one for the reroll, and one to address #101.Also attached a screenshot that the RTL still looks fine.
EDIT: Oops, posted the interdiffs with .patch. Sorry for the below noise.
Comment #106
lewisnymanIt seems like we can use
background-position: right 10px top 17px;instead of the percentage so that works great. I don't think I was even aware of that. Well done!I manually tested the patch just to double check and I think it looks good. Onwards!
Comment #107
alexpottCommitted 877b9c6 and pushed to 8.0.x. Thanks!
Comment #109
gábor hojtsyYay, thanks. Finally unpostponed #2318381: Message not styled properly on interface translation page :) Progress!
Comment #110
sqndr commentedNice work. This got in! Woop woop! :)