startae / hagrid

:straight_ruler: Hagrid is a mixin library for responsive websites and web applications.
https://hagrid.netlify.com/
MIT License
30 stars 3 forks source link

What happened with the `auto`modifier? #30

Closed renatocarvalho closed 9 years ago

renatocarvalho commented 9 years ago

Hey @felics, I was wondering why you removed the auto modifier. Is there a way to accomplish the same behavior without that?

fspoettel commented 9 years ago

@renatocarvalho auto was removed because it's the only modifier that doesn't degrade gracefully on the fallback and works inconsistently with the rest of the grid's modifiers. On top, it's super easy to do with vanilla flexbox, it's basically only setting:

.grid {
    display: flex;
    flex: 1 1 auto;
}

.grid-item {
     flex: 1 1 0%;
}

.grid-item.example {
    flex: 0 0 auto;
    width: 50%;
}

I'm open to readding it though, I never found a good use-case for it where I wouldn't rather have used vanilla flexbox.

renatocarvalho commented 9 years ago

@felics Make sense! That's exactly what I did after the removal of the auto.

Perhaps people who have never seen Hagrid will look for that option. Do you think we should add a note to the documentation?

fspoettel commented 9 years ago

@renatocarvalho I'm open to make it default behavior as soon as it's time to ditch the fallback. We could mention it in the docs, sure.

renatocarvalho commented 9 years ago

:+1: