Problem:

Umami theme has lots of display issues in Internet Explorer.

  1. main menu links are not displayed - major usability bug
  2. logo image is stretched vertically
  3. Text in banner is at top of image, rather than midway down
  4. Promoted Articles heights are equal but not correct
  5. Frontpage view flexbox is not working (probably just need to add in a prefix ms-flex
  6. Articles listing page - flexbox is not working
  7. Article node - is sidebar working
  8. Recipe node - same issue with sidebar
  9. Recipe node - icons and text are squashed on top of each other
  10. Recipe node - ingredients and instructions flexbox is not working
  11. Taxonomy term page - flexbox not working
  12. Search block - icon missing

Internet Explorer 11 is one of the supported browsers for D8.

CommentFileSizeAuthor
#38 11--after.png424.72 KBsmaz
#38 11--before.png574.87 KBsmaz
#38 10--after.png575.48 KBsmaz
#38 10--before.png257.44 KBsmaz
#38 8--9--after.png647.87 KBsmaz
#38 9--before.png50.11 KBsmaz
#38 8--before.png811.48 KBsmaz
#38 7--after.png1.1 MBsmaz
#38 7--before.png1.3 MBsmaz
#38 6--after.png919.48 KBsmaz
#38 6--before.png1.05 MBsmaz
#38 5--after.png1.41 MBsmaz
#38 5--before.png1.72 MBsmaz
#38 4--after.png890.49 KBsmaz
#38 4--before.png811.72 KBsmaz
#38 3--after.png1.42 MBsmaz
#38 3--before.png1.36 MBsmaz
#38 1--2--12--after.png81.3 KBsmaz
#38 1--2--12--before.png39.67 KBsmaz
#36 interdiff_20-33.txt6.79 KBfinnsky
#36 2943107-33.patch14.54 KBfinnsky
#34 interdiff_full_20_28.txt6.72 KBfinnsky
#30 safari-ie11-tall-thumbnail.jpg447.5 KBtomphippen
#28 2943107-full-3.patch15.86 KBtomphippen
#23 2943107-grids-fix-ie11-v2.patch3.92 KBnicholass
#22 2943107-grids-fix-ie11.patch3.93 KBnicholass
#21 screenshot-full.png4.95 MBmherchel
#20 2943107-full-2.patch10.41 KBmherchel
#18 2943107-full.patch6.73 KBmherchel
#16 2943107-16-ie11-homepage-carrot-height-fix.patch604 bytesjordana
#15 2943107-15-homepage-recipes-flexbox-ie11-fix.patch504 bytesjordana
#11 2943107-recipe-layout-fix-ie11.patch1.25 KBnicholass
#10 2943107-header-ie11-fixed.png194.72 KBmherchel
#9 2943107-header.patch3.79 KBmherchel
#5 recipe-page-icons.png130.39 KBsmaz
#5 recipe-instructions-ie11.png384.82 KBsmaz
#5 promoted-items-ie11.png510.29 KBsmaz
#5 main-navigation-ie11.png89.87 KBsmaz
#5 main-banner-ie11.png1.97 MBsmaz
#5 homepage-recipes-list-ie11.png1.35 MBsmaz
#5 articles-listing-ie11.png855.9 KBsmaz
#5 article-page-sidebar-ie11.png1.01 MBsmaz

Comments

andrewmacpherson created an issue. See original summary.

andrewmacpherson’s picture

As far as I know we haven't set a date or D8 version which will end support for IE11

larowlan’s picture

Issue tags: +Umami beta blocker
markconroy’s picture

Issue summary: View changes
smaz’s picture

We reviewed IE11 in our weekly call yesterday, and @markconroy has updated the initial issue with the full list of issues we found.

Here's the screenshots:

* Main menu links not displayed + Search icon missing:

Umami main navigation

* Text in banner at top of the image, not centred vertically:

Umami main banner

* Recipe icons are collapsing together:

Umami recipe icons

* Homepage promoted articles:

Umami promoted articles

* Frontpage recipes flexbox not working:

Umami homepage recipes list

* Articles list page not flexing:

Umami articles list

* Article node: Main page content is very wide & sidebar is off-screen:

Umami article page

mherchel’s picture

Issue tags: +#fldc18
nicholass’s picture

Starting to work on this at #FLDC18

jordana’s picture

starting to work on this @florida drupal camp 2018 #fldc18

mherchel’s picture

StatusFileSize
new3.79 KB

This patch fixes the header for the site in IE11.

mherchel’s picture

StatusFileSize
new194.72 KB
  1. +++ b/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css
    @@ -82,6 +83,16 @@
    +@media all and (-ms-high-contrast: none),(-ms-high-contrast: active) {
    

    This media query will target only IE10 (which doesn't matter) and IE11 browsers.

  2. +++ b/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css
    @@ -82,6 +83,16 @@
    +    background-image: url(../../../../images/png/search.png);
    

    I tried for hours to get IE11 to play nicely with this SVG background image and was unsuccessful. So, instead we're loading a PNG.

  3. +++ b/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-main/menu-main.css
    @@ -75,7 +75,7 @@
    +    max-height: none;
    

    IE11 does not support "initial". Setting to none, which is the initial value.

  4. +++ b/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-main/menu-main.css
    @@ -111,7 +111,9 @@
    +    flex-grow: 0;
    

    Ie11 does not support CSS calc within flexbox shorthand. Writing it out works around the bug.

  5. +++ b/core/profiles/demo_umami/themes/umami/logo.svg
    @@ -1,5 +1,5 @@
    +<svg width="205px" height="60px" viewBox="0 0 711 206" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    

    IE11 handles SVGs like 💩. Specifying the correct width/height here fixes it and does not impact other browsers.

nicholass’s picture

StatusFileSize
new1.25 KB

This fixes the recipe node types layout issues in IE11

nicholass’s picture

  1. +++ b/core/profiles/demo_umami/themes/umami/css/components/content-types/recipe/recipe.css
    @@ -36,7 +36,8 @@
    +  flex: 0 0 auto;
    

    IE11 does not handle the calc in flexbox shorthand https://github.com/philipwalton/flexbugs#flexbug-8

  2. +++ b/core/profiles/demo_umami/themes/umami/css/components/content-types/recipe/recipe.css
    @@ -169,6 +171,7 @@
    +    max-width: 33%; /* fixed IE11 bug */
    

    IE11 has issues with flex children having padding so they need the max-widths restated https://github.com/philipwalton/flexbugs/issues/3

mherchel’s picture

StatusFileSize
new4.39 KB

This fixes the homepage banner vertical centering issue in IE💩11

mherchel’s picture

StatusFileSize
new607 bytes

crap. that includes the previous patch. This patch is the vertical centering issue fix only,

jordana’s picture

StatusFileSize
new504 bytes

Created patch for IE11 issue where on the homepage the Recipes take up full width.
This is because of an IE11 Flexbox issue where it ignores shorthand calc.
To fix this you need to write out the calc out under "flex-basis" instead of in flex.

So changes from
flex: 0 0 calc(50% - 28px);
to

flex: 0 0; 
flex-basis:  calc(50% - 28px);
jordana’s picture

In IE11 the columns under the banner are stretched and very long. First "carrot" column is fixed by adding a height value to it. (height 0 removes background color, so added height: 100%)

andrewmacpherson’s picture

Re: #10.1 , using the high-contrast media query to identify MSIE...

+@media all and (-ms-high-contrast: none),(-ms-high-contrast: active) {
This media query will target only IE10 (which doesn't matter) and IE11 browsers.

Be careful - the media query doesn't just target MSIE; MS Edge responds to it too.

(Aside: Firefox on Windows responds when a Windows High Contrast theme is active, but doesn't support this CSS media query. There was some discussion in the Mozilla bugtracker about whether to implement this media query, but they seem to have decided against it.)

Using it to detect an MS browser regardless of whether a HC theme is active is a bit of a hack IMO. Sure, it's valid CSS, but it subverts the intended use of the media query. Be aware that we might want to use it properly for #2894237: Make core themes more robust in Windows High-Contrast mode.

If you do use it this way, AVOID using it to change colour properties, especially if it involves the transparent keyword or system color keywords.

I made a test page for various forms of the media query: MS High Contrast Media Query Test Page

mherchel’s picture

StatusFileSize
new6.73 KB

Uploading combined patch that includes all previous patches.

mherchel’s picture

@andrewmacpherson great point. The correct way to do this would be to modify the SVG... which I wasn't able to do (at least while sprinting). I'll mess with it today to see if I can get it working now that I'm back at my regular workspace.

mherchel’s picture

StatusFileSize
new10.41 KB

Attached is a patch that edits the search SVG icon to work in all browsers including IE. So, we do not need the PNG anymore.

mherchel’s picture

StatusFileSize
new4.95 MB

So, this is where the last patch is at in IE11. You can see that we have the header, search icon, nav, and some frontpage views fixed.

The middle stretched frontpage view is a complete pain-in-the-💩, and I haven't been able to figure that out yet.

nicholass’s picture

StatusFileSize
new3.93 KB

Adding the same IE11 flexbox calc shorthand fixes for the grids

nicholass’s picture

StatusFileSize
new3.92 KB

Ignore patch in comment #22 had a copy and paste error. Corrected patch attached.

markconroy’s picture

Issue tags: +dclondon, +#dclondon
markconroy’s picture

Issue tags: -#dclondon
tomphippen’s picture

I've got the stretched homepage view fixed locally, and I'm pretty sure it's the same issue as the articles listing page.

I'll get that, and anything else I can from the list, done this afternoon and post a patch later.

mherchel’s picture

@tomphippen Nice! I wasn't able to find a solution to that short of 1) specifying an arbitrary height, or 2) modifying the templates markup.

tomphippen’s picture

StatusFileSize
new15.86 KB

@mherchel I've sort of gone for 1, but with a height based on a mixture of the viewport width & the grid layout it's in.
It's not a perfect solution but I think it's good enough & keeps it the same across browsers rather than doing something clever.

I've got my patch attached, it's my first drupal patch so I'm hoping I've got it right, it should include

- All the previous patches
- A fix to the height of the logo in IE11 on Windows 7 (which acts in a different way to other versions)
- Setting flex-basis on node--view-mode-highlighted-small .node__content as described above to stop the heights going crazy on the article, recipe & taxonomy pages
- Adding flex-basis and a couple of other tweaks to fix the same issue on the frontpage view
- Fixed the sidebar issue

I do need to do a thorough cross browser test in Firefox and Edge to make sure these fixes haven't caused regressions elsewhere, will do that tomorrow.

mherchel’s picture

Awesome. You might want to consider limiting the arbitrary height to IE11. My thought is that if the person demoing the profile modifies the view, the arbitrary height will probably become invalid. Limiting it to IE11 could mitigate this. https://philipnewcomer.net/2014/04/target-internet-explorer-10-11-css/

Just a thought :)

tomphippen’s picture

StatusFileSize
new447.5 KB

That's a good point I hadn't considered.

The good news is I don't think it'll be an issue in this case. As those columns are using flexbox with the flex-direction set to column the height is being set with flex-basis, which means decent browsers will correctly increase it. It does break in IE11, but would do the same if the code was just targeted at it.

So I'd still argue sticking with the same code for all browsers is the least bad option (especially with @andrewmacpherson's note on targeting IE with that media query). I've attached a screenshot of how Safari & IE11 handle a very tall image being used, Chrome & Edge work in the same way as Safari.

markconroy’s picture

Issue tags: +Umami stable blocker
markconroy’s picture

Issue tags: -#fldc18, -dclondon +Nashville2018
finnsky’s picture

After applying patch #28 catched bug with sidebar items broken because of flex-basis property.
https://gyazo.com/fdd934bb70261d459eecf1462cac0427

finnsky’s picture

StatusFileSize
new6.72 KB

Added interdiff between #28 and #20

finnsky’s picture

Bottom recipe title lost good alignment: https://gyazo.com/5c5166d1e21db4411f377915ad852865

finnsky’s picture

Status: Active » Needs review
StatusFileSize
new14.54 KB
new6.79 KB

Suggested patch based on #20 because #28 contains some fixed values for flex bases which not needed imho. Image style may be changed. or image may be absent.
Contains all fixes, include grids. Please review.

kjay’s picture

This CSS looks good to me and we've reviewed this as part of this week's OOTB meeting. @smaz about to follow up with his review.

smaz’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new39.67 KB
new81.3 KB
new1.36 MB
new1.42 MB
new811.72 KB
new890.49 KB
new1.72 MB
new1.41 MB
new1.05 MB
new919.48 KB
new1.3 MB
new1.1 MB
new811.48 KB
new50.11 KB
new647.87 KB
new257.44 KB
new575.48 KB
new574.87 KB
new424.72 KB

Ok, fresh review - I think this is good to go! Thanks everyone!

I've taken before & after screenshots of everything I reported in my initial post, and can confirm everything looks fine now. I've also had @kjay review the CSS, as that's his area of expertees :)

(Sorry, screenshots aren't amazing - smaller screen this time :( )

1, 2 & 12:
main menu links are not displayed - major usability bug
logo image is stretched vertically
Search block - icon missing

Before:
1, 2 & 12

After:
1, 2 & 12

3: Text in banner is at top of image, rather than midway down

Before:
3

After:
3

4: Promoted Articles heights are equal but not correct

Before:
4

After:
4

5: Frontpage view flexbox is not working (probably just need to add in a prefix ms-flex

Before:
5

After:
5

6: Articles listing page - flexbox is not working

Before:
6

After:
6

7: Article node - is sidebar working

Before:
7

After:
7

8 & 9:
Recipe node - same issue with sidebar
icons and text are squashed on top of each other

Before:
8
9

After:
3

10: Recipe node - ingredients and instructions flexbox is not working
Before:
10

After:
10

11: Taxonomy term page - flexbox not working
Before:
11

After:
11

smaz’s picture

Adding credit to @kjay for the review + testing this with me.

markconroy’s picture

Status: Reviewed & tested by the community » Needs review

Setting this back to Needs Review, just so we can check that these great fixes for IE11 don't break current versions of Chrome/Firefox/etc.

markconroy’s picture

Assigned: Unassigned » markconroy
markconroy’s picture

Status: Needs review » Reviewed & tested by the community

Hi,

I've given this patch a test in the latest versions of Chrome and Firefox and everything still seems to work as expected. Checked in it IE11 and everything is as the screenshots suggest it is. Bravo!!!

RTBC again.

gábor hojtsy’s picture

  • Gábor Hojtsy committed 7bbc3fa on 8.6.x
    Issue #2943107 by mherchel, NicholasS, jordana, finnsky, tomphippen,...

  • Gábor Hojtsy committed 6f496f0 on 8.5.x
    Issue #2943107 by mherchel, NicholasS, jordana, finnsky, tomphippen,...
gábor hojtsy’s picture

Version: 8.6.x-dev » 8.5.x-dev
Status: Reviewed & tested by the community » Fixed

Yay superb, thanks. The changes look fine to me as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

lauriii’s picture

Adding credit from issue marked as duplicate to this #2943630: Umami theme: Safari 9.1 issues