Search code examples
twitter-bootstrapmaterial-design-lite

responsive image in Material Design Lite


I'm porting a design made for Bootstrap into MDL (don't ask). I'm trying to find some equivalent mechanism for implementing bootstrap's .img-responsive functionality in MDL, but I keep coming up short. Is there a standard way to do this, or do I have to roll my own?


Solution

  • while I agree that's a way to do this, i'm looking to see if there's an MDL-standard way

    I was looking for the same and dug up a bit more, from the docs (here they are referring to cards and the images inside at first):

    For simplicity we opted to set a hard width and allow developers to override that as-needed since there is no set right way to have responsive cards display.

    There is also a mention of using the picture tag, you might want to check support first...

    @JakeC1020 Answer is a correct implementation for now then.