Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-card height doesn't adjust properly to respect scaled-down image size in IE #761

Closed
sstorie opened this issue Nov 25, 2014 · 10 comments
Closed
Assignees
Milestone

Comments

@sstorie
Copy link

sstorie commented Nov 25, 2014

Please forgive me if I'm misunderstanding the root cause of this, but I'm trying to create a "masonry layout" where I've got multiple columns of images that are different dimensions. I'm trying to use cards to hold each image, and in Chrome and Firefox it works exactly as I expect. The card scale to the window (using flex) and the images scale the match the size of the cards.

However, on IE 11 the height of the cards seems to stay with the actual height of the image, even if it's being scaled down to a smaller size. I've created a Codepen that demonstrates the problem:

http://codepen.io/sstorie/pen/myJWxQ

You can see in IE that the images that are orientated horizontally scale their height down to fit the width of the card, but the height of the card doesn't scale down with it. It remains that the height of the image.

Is this a bug in md-card, or do I just have to add some IE-appropriate CSS? If it's an IE thing, any guidance on what should be added to make this flow properly?

@sstorie
Copy link
Author

sstorie commented Nov 25, 2014

If it helps at all I asked this same question on stackoverflow, but over there I have the images attached that visually show what I'm trying to solve. Here's how this example looks in Chrome and Firefox:

md-card chrome

...but here's how it looks in IE11:

md-card ie

@ThomasBurleson ThomasBurleson added this to the 0.7.0-rc1 milestone Dec 2, 2014
@ThomasBurleson ThomasBurleson modified the milestones: 0.7.0, Backlog Jan 15, 2015
@Splaktar
Copy link
Member

Splaktar commented Mar 7, 2015

I've updated the Codepen to 0.8.3: http://codepen.io/Splaktar/pen/Kwxmxa
I will test with IE 11 when I am able to get to a Windows machine. But there are certainly some flexbox issues in IE 11 that still need to be worked out. Some may be fixable with -ms prefixes.

@Splaktar
Copy link
Member

Splaktar commented Mar 9, 2015

This seems to be fixed or at least doing a lot better now. See the image attached here from IE 11 with the updated codepen. It looks like the images are stretched to fit the card.

ie11_card_image_scaling

@ThomasBurleson
Copy link
Contributor

Fixed.

@Frank3K
Copy link
Contributor

Frank3K commented Sep 12, 2015

Unfortunately I don't think this is fixed. Screenshot of the current demo-site (using master) in Internet Explorer 11.

material_ie_stretch

@Frank3K
Copy link
Contributor

Frank3K commented Oct 10, 2015

@ThomasBurleson: This issue still exists in Internet Explorer 11. Can you re-open this issue or should I create a new one?

@silberjan
Copy link

issue still exists for me (1.0.4 @ chrome 48)
surprisingly, in ms edge it works

@silberjan
Copy link

OK, I tested a little bit.

It is working in:

  • Firefox 44
  • Edge 25
  • Vivaldi

Not working in:

  • Chrome 48
  • Opera 34

Everything on Windows
In Chrome for Mac it's working.

@Noppey
Copy link

Noppey commented Feb 3, 2016

+1, microsoft edge adjusts image height to scale with max width, chrome keeps height at natural height.

@ThomasBurleson
Copy link
Contributor

Please see #6981

@angular angular locked and limited conversation to collaborators Feb 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants
@topherfangio @ThomasBurleson @Splaktar @sstorie @Frank3K @silberjan @Noppey and others