react-stonecutter icon indicating copy to clipboard operation
react-stonecutter copied to clipboard

Accept non-px columnWidth value.

Open lvnr opened this issue 7 years ago • 2 comments

Since the column width is a fixed value, is there a way to specify it in % or "vw", instead of "px"?

I can't seem to get how can I achieve responsive column widths.

Thanks!

lvnr avatar Nov 04 '16 21:11 lvnr

Hi, there is an experimental feature where you can supply a lengthUnit prop to change the units used to something other than px. It's not that helpful though in its current form.

I think what we might need for a start is to be able to specify the horizontal and vertical units separately, then you could use vw for the horizontal units. The trouble is the gutters, you might want to specify the gutterWidth and gutterHeight in px still but this way the gutterWidth would switch to vw.

Additionally the measureItems HOC will need updating to redo the measuring on the document resize event if that is to be used in conjunction.

What do you think? Would you be ok setting the gutterWidth to zero and managing this yourself with extra DOM nodes, padding etc.?

dantrain avatar Nov 15 '16 11:11 dantrain

@dantrain Is it already possible to have responsive columns by using a custom layout function?

mquandalle avatar Apr 24 '18 13:04 mquandalle