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.
Recommended commit message:
git commit -m 'Issue #2470233 by wadmiraal, emma.maria, sxnc, idebr, LewisNyman: Fix the visual bugs in the Bartik footer'
Many issues related to the footer were committed and each one seemed to introduce a visual bug. We need to fix all of them in this new issue.
Somewhere between beta7 and beta8 the footer layout and styles broke.
We also had this issue #1273052: Footer container contents are wider than other page elements in Bartik. which tried to improve the footer layout, but these styles were also lost.
Fixes to be added:
- All of the footer containers and styling (footer top, bottom and the dividing line) need to vertically sit inline with the rest of the region containers on the page.
- Also where did the blue link of a bigger size come from?
Screenshot pointing out bugs.
Beta phase evaluation
Issue category | Bug because the Footer visually looks broken at HEAD right now. |
---|---|
Issue priority | Not critical because the footer still functions fine |
Unfrozen changes | Unfrozen because it only changes CSS and markup. |
Prioritized changes | The main goal of this issue is to fix visual regressions |
Disruption | No disruption. |
Comment | File | Size | Author |
---|---|---|---|
#49 | 2470233-47-after.png | 120.99 KB | idebr |
#47 | drupal_bartik-footer_2470233_47.patch | 5.68 KB | emma.maria |
#47 | interfiff-47-41.txt | 1.56 KB | emma.maria |
#44 | 2470233-41-after.png | 59.36 KB | idebr |
#41 | drupal_bartik-footer_2470233_41.patch | 5.68 KB | emma.maria |
Comments
Comment #1
emma.mariaComment #2
wadmiraal CreditAttribution: wadmiraal commentedI'll have a look at it.
Comment #3
wadmiraal CreditAttribution: wadmiraal at educa.ch commentedFixed the size and color. The alignment will have to be looked at at this more recent issue: https://www.drupal.org/node/1273052
Comment #4
wadmiraal CreditAttribution: wadmiraal commentedFixed the size and color. The alignment will have to be looked at at this more recent issue: https://www.drupal.org/node/1273052
Comment #5
wadmiraal CreditAttribution: wadmiraal at educa.ch commentedOops, my bad. It is not related to the linked issue. Here's a new patch.
Comment #6
wadmiraal CreditAttribution: wadmiraal commentedOk, sorry, I'm confused with all these issues :-). So, the alignment was actually "right" in beta8? As per: https://www.drupal.org/node/1273052#comment-9699005
If so, ignore the patch from #5, use #4.
Comment #7
emma.mariaComment #8
googletorp CreditAttribution: googletorp commentedTested patch from #3 and everything looks good.
Comment #9
emma.mariaDue to the issue being a fix for visual bugs we need to see some screenshots as part of the review before it can be set to RTBC.
Comment #10
googletorp CreditAttribution: googletorp commentedAs far as I can tell, it now looks exactly as before.
Comment #11
emma.mariaI'm sorry to be a pain but I can't tell from the screenshot if the edges of the footer region line up with in relation to the rest of the regions on the page. The footer should not be wider than the other regions on the page.
Also I can see from the screenshot that the footer top/bottom dividing line is wider than the footer content. We want the content and the line to start and end at the same points as shown in the before screenshot of Beta 7 in the summary.
Setting to needs work.
Comment #12
wadmiraal CreditAttribution: wadmiraal commentedOn it.
Comment #13
wadmiraal CreditAttribution: wadmiraal commentedSo, here's the status from #3:
As you can see, it aligns to the left, but the padding from the main menu, the content and the footer, are not identical. How is the footer content supposed to be aligned anyway? Do we have some reference somewhere? Because from other issue queues, I get some contradicting info.
This is the status with patch #5:
It is aligned to the left, with no padding. And the footer is slightly wider than the content.
Comment #14
googletorp CreditAttribution: googletorp commentedI had no idea reviewing visual bugs was this much of a hazzle.
Anyways, like I have been say, everything looks nice:
I've overlayed the font and placed the two side by side. As you can see they are pretty much identical. On the one site I had some content on the frontpage which makes stuff above the footer look a bit different, but the footer is exactly the same (beta 7 and the patch from #3)
Comment #15
wadmiraal CreditAttribution: wadmiraal commentedJust without the visual overlays.
Patch #3:
Patch #5:
Comment #16
emma.mariaSetting to Needs review as committers are active at Drupal Dev Days and as Bartik maintainer I need to take a closer look at this.
Comment #17
emma.mariaWe are missing the improvements from this issue #1273052: Footer container contents are wider than other page elements in Bartik..
The footer needs to line up with the content section at all screen widths. The latest patch does not achieve this.
We need to take the patch in #5 where the line and content are flush at the beginning of the footer like so...
and engineer the footer so the width of the footer always visually lines up with the main content section. In other words the edge of the footer lines up with the actual content and not the edge of the padding on the content.
The issue with the site logo not lining up can be raised in a follow up issue.
I have spoken about this with @lewisnyman who can assist @wadmiraal with this patch if he would like to further take this work on :)
Comment #18
wadmiraal CreditAttribution: wadmiraal commentedSure, I'll take it. It's pretty clear now :-).
Like I said: there are many issues, with diverging screenshots with comments "Looks fine to me". So, I have no idea how it's actually supposed to look. Also, if we have a reference somewhere (design, PSD, JPG, whatever), that would be helpful.
Comment #19
wadmiraal CreditAttribution: wadmiraal commentedThe footer width bug was probably introduced when going for re-usable CSS classes,
layout-container
to be specific. The obvious fix would be to correct the footer layout-container's width:However, this is fragile: if we decide to change the layout width, we need to remember to change it in 2 places.
A more robust, but also more verbose, solution would be to adapt the styling a little bit, by putting the top border on
.region-footer-fifth
instead of.site-footer__bottom
. That way, we can add a 15px margin to the left and right of the region, and it will align nicely.What do you think?
Comment #20
wadmiraal CreditAttribution: wadmiraal at educa.ch commentedThis fixes the width at all breakpoints, as well as the 4 other footer regions, which didn't align properly.
Comment #21
wadmiraal CreditAttribution: wadmiraal at educa.ch commentedScreenshots!
Comment #22
emma.mariaThe footer now looks beautiful at all widths.
@1360px
@730px
@400px
However a bug has been introduced to other places on the page.
The changes to the template shown below have caused visual regressions and markup changes to all menus printed. The if was being used to only allow a div wrapper with the class content to print around menus that do have labels. .content adds margin top I assume to provide spacing between the label and the menu.
This is seen clearly in the header...
We either need to come up with a better if condition or avoid using the .content wrapper in the footer.
Comment #23
wadmiraal CreditAttribution: wadmiraal at educa.ch commentedOuch. Ok, I'll have a look at it :-)
Comment #24
wadmiraal CreditAttribution: wadmiraal at educa.ch commentedActually, I think we should remove the margin on all
.block .content
elements in the header, not just the .header-region. We want all regions in the header to have as little effect on other elements as possible so as not to mess up the layout (contrary to the content area, which is a lot more lenient).The header now looks normal (I think):
Comment #25
emma.mariaI agree with this change. Bartik does not even print a .region-header wrapper currently at HEAD so these styles were doing nothing.
We are dealing with the issue of .content being too broad and affecting everything within #2398463: Clean up the "content" component in Bartik. Therefore having code to get around the issues with .content and focussing on getting the footer looking perfect again is OK by me.
I compared Bartik before and after the patch and there are now no visual regressions anywhere else on the page, only improvements to the footer which looks fantastic now.
Attached is a document containing the visual comparisons.
Comment #26
emma.mariaComment #27
emma.mariaSuggested commit message
git commit -m 'Issue #2470233 by wadmiraal, emma.maria: Fix the visual bugs in the Bartik footer'
Comment #28
emma.mariaAdded beta evaluation.
Comment #29
alexpottWhat about rtl?
Comment #30
wadmiraal CreditAttribution: wadmiraal at educa.ch commentedOuch, there's a lot more wrong in the footer with RTL. I'll have a look at it.
Comment #31
wadmiraal CreditAttribution: wadmiraal at educa.ch commentedHow's this?
Comment #32
wadmiraal CreditAttribution: wadmiraal at educa.ch commentedNever mind, I just see now that RTL doesn't line up properly in full width.
Comment #33
wadmiraal CreditAttribution: wadmiraal at educa.ch commentedFixed the RTL footer at full width. Unfortunately, we need some pretty specific rule to get this to work...
Refer to #31 for screenshots at other resolutions.
Comment #34
LewisNymanInstead of having to override the selector, can we use a min-width/max-width media query so it doesn't apply to widths over 851px
Comment #35
sxnc CreditAttribution: sxnc as a volunteer commentedI'm working on this @DrupalCon LA
Comment #36
sxnc CreditAttribution: sxnc as a volunteer commentedOlright, here it goes, I moved some code around and moved part of the styling into the specific range of 560-850.
Comment #37
sxnc CreditAttribution: sxnc as a volunteer commentedGonna leave the sprinting room soon, so I'll leave it by unassigning it :)
Comment #38
emma.mariaComment #39
idebr CreditAttribution: idebr commented@sxnc Thanks for working on this issue! I found a few issues with manual testing:
.region has no padding, so this line has no effect.
This line breaks the alignment of the site-footer__top with site-footer__bottom. Perhaps this should be site-footer__bottom .layout-container?
The box-sizing places the padding on the inside of the max-width. This results in footer blocks being places against the viewport for smaller viewports.
Comment #40
emma.mariaI have updated the issue summary to clearly point out what we are trying to achieve.
Unfortunately #36 has introduced a few visual regressions that didn't exist in #33...
Patch 33
Patch 36
Comment #41
emma.mariaI took a look at the patch and made some improvements to fix the regressions in #36 and to address the things raised by @idebr in #39 and @lewisnyman in #34.
Notably:
I moved the layout-container classes that were inconsistently applied directly to footer-top and then wrapped around footer-bottom. This has been moved to a div wrapper around both footer-top and footer-bottom and does not cause any visual issues. This also fixed point 2 raised by @idebr.
For the rest of #39:
1. This code no longer exists in the patch.
3. The box-sizing is not affecting the blocks at smaller viewports with this patch.
For #34:
I moved all of the styles specific to the "tablet 2 x 2 block view" of the four footer blocks to a min max media query so we don't have to undo anything in the layout at the next breakpoint up which was messy, as pointed out in #34.
I checked the patch visually LTR and RTL and everything lines up with the main content container at all viewports. So no nasty surpises for anyone reviewing this. The footer looks amazing now :)
Please can someone manually test and review at various screenwidths with a various number of blocks.
Comment #44
idebr CreditAttribution: idebr commentedThanks emma, this is looking very good!
Now that .layout-container has moved up, this change is no longer necessary.
.region has no padding, so this line does not do anything.
The blocks on the side are now wider than the two in the middle on 1290px+ viewport. Let's try and keep these the same width when possible.
Screenshot of different block widths:
The regions in the footer now have additional spacing at the top/bottom. The vertical padding is unnecessary as there is quite a bit of padding already.
Nitpick: the .site-footer_bottom element has 4 spaces indent instead of 2 :)
Comment #45
LewisNymanI manually tested this patch and I can confirm it looks great.
Comment #46
emma.maria:) I don't think @LewisNyman saw @idebr's comment. We need to fix the code issues, but nice to know the footer visually looks great.
Comment #47
emma.mariaFeedback for @idebr's feedback in #44
Comment #49
idebr CreditAttribution: idebr commentedExcellent, thanks Emma! I did another manual test to confirm.
A screenshot for good measure:
Comment #50
Wim LeersJust wanted to say: such awesome collaboration in this last bunch of comments! Kudos to @emma.maria, @LewisNyman and especially @idebr. :)
Comment #51
emma.mariaThanks @Wim Leers.
Which reminds me I need to make sure I put everyone in a recommended commit message.
git commit -m 'Issue #2470233 by wadmiraal, emma.maria, sxnc, idebr, LewisNyman: Fix the visual bugs in the Bartik footer'
Thanks all!
Comment #52
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed b84088e and pushed to 8.0.x. Thanks!