Rebass: max height/width example for Media component?

Created on 10 Mar 2016  路  4Comments  路  Source: rebassjs/rebass

First instinct was thinking that there should be props for it, but you probably know of a better way. Do you have an example of doing this?

Problem is super large images, or images of different sizes create crazy looking lists.

Is using reflexbox the solution here?

Most helpful comment

Yeah I'm totally open to building out the Media component a little better.

My usual instinct is to say that every image should have width and height attributes, but this component doesn't really support that at the moment.

All 4 comments

@contra are you able to use the theme context to pass a maxHeight/naxWidth css style?

@phated No - seems like there's no way to style the image at all. (https://github.com/jxnblk/rebass/blob/master/src/Media.js#L36 passes no styles through)

Maybe a better solution would be to break the image out of the Media innards and have the user specify it (like you do with text and heading)

Yeah, a change just landed that split the Step component out of SequenceMap. I think the same could/should happen here.

Yeah I'm totally open to building out the Media component a little better.

My usual instinct is to say that every image should have width and height attributes, but this component doesn't really support that at the moment.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karland picture karland  路  7Comments

tpkiddle picture tpkiddle  路  3Comments

jxnblk picture jxnblk  路  5Comments

coreybruyere picture coreybruyere  路  5Comments

gi-alec picture gi-alec  路  6Comments