allow string props for image width/height#8
allow string props for image width/height#8Roilan wants to merge 3 commits intochromakode:masterfrom
Conversation
|
Thanks @Roilan! I've not heard of |
|
You have a good point. I don't think I've seen people do it outside of using CSS for |
|
I think that sounds like the way to go, though there is this caveat to using images without sizes in the markup: https://www.campaignmonitor.com/blog/email-marketing/2007/06/always-include-the-width-and-h/ |
|
Hmmm. You have a good point. I'm not entirely sure what the right decision is here. While |
|
It seems like a good idea to include a starting width/height even if the image is going to be scaled, and progressively enhance via CSS if it's supported. Overriding the |
|
Out of the options we have mentioned, I think that's the best thing to do. We should also add a note in the documentation mentioning this. Wouldn't want someone spending a great amount of time trying to debug this. I'm good to make the adjustments if you're on board. |
|
That sounds great, thank you! |
|
Closing see #9 |
Allows Image height / width a string prop because
autois a common use case to maintain aspect ratio.