inuitcss/objects.pack

Add responsive option

nenadjelovac opened this issue · 8 comments

I believe there are cases for responsive pack, and it should be easy to done (just like objects.flag).

Making this responsive will be very difficult, if not impossible.

display: table[-*]; cannot break onto several lines, so you’d have to have stacked (i.e. display: block;) and then jump into display: table[-*]; at a certain point.

With this object, there would be no way to have items break onto new lines at different breakpoints; it’s either all or nothing :(

With this object, there would be no way to have items break onto new lines at different breakpoints; it’s either all or nothing :(

Yeah, so break all at one breakpoint (just like flag). The key difference is that with flag we know we only have two elements that will be stacked vertically, but with this we don't know how many.

It's not perfect, I know, but better than nothing, right? Or do you think it's better to leave it out of the framework business and let implementors use it per case basis?

I could build an all-at-once version, yeah.

It's not perfect, I know, but better than nothing, right?

I think you might be right. Let me look into it :)

I think you might be right. Let me look into it :)

Great, thanks!

In all honesty this, flag, media and similar are just aching for element queries (someday) :)

@nenadjelovac @csswizardry

leave it out of the framework business and let implementors use it per case basis

After reconsidering the problem the last few months, I'd vote for such an approach. It's far more easier for implementors to create modifier classes like o-pack@palm or whatever to get the behaviour they want than let the framework provide a one-size-fits-all-solution far everybody, which is never quite right and has to be tweaked slightly from project to project.
Leaving a responsive modifier out of the framework will keep it simple and extendable for implementors.

The same applies to the media- and flag-object, IMO. I've often need more than one breakpoint for the media-object, which case is not covered in that module.
Furthermore, that's a decision I don't want to make for such an abstract object as the media-object. I think something like a breakpoint in this case is more a job to be dealt with in the components layer, really – even if element queries were possible.

@csshugs sorry for putting element queries in there and getting confusion slip into this.

What I was after is something like in flag object here: a simple "make it display: block when smaller than $some-breakpoint".

@nenadjelovac Do we agree on not implementing this in this version of inuitcss?

@csshugs agreed. Closing this issue.