Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept non-px columnWidth value. #20

Open
lvnr opened this issue Nov 4, 2016 · 2 comments
Open

Accept non-px columnWidth value. #20

lvnr opened this issue Nov 4, 2016 · 2 comments

Comments

@lvnr
Copy link

lvnr commented Nov 4, 2016

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!

@dantrain
Copy link
Owner

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.?

@mquandalle
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants