styled-components-grid icon indicating copy to clipboard operation
styled-components-grid copied to clipboard

"Breakpoints" object only works when written in order from smaller to larger breakpoints

Open CharlieIGG opened this issue 7 years ago • 2 comments

Example:

If I'm on a large screen and I write:

<Grid.Unit width={{ sm:0, md:1/2, lg: 1/3}} />

This does work for me, however if I write the object in any other order, for instance:

<Grid.Unit width={{lg: 1/3, md:1/2, sm:0}} />

I always get a 50% width, on a large screen size.

EDIT: I get 50%, not 0%

CharlieIGG avatar Jul 20 '17 15:07 CharlieIGG

Thanks for the report! Probably a bug in styled-components-breakpoint. I'll look at it in the next few days.

jameslnewell avatar Jul 21 '17 05:07 jameslnewell

few years...

giautm avatar May 19 '20 21:05 giautm