vikramrojo / fortune

🔮Fortune is your friendly CSS properties framework.
MIT License
16 stars 2 forks source link

Remove container from columns #5

Closed vikramrojo closed 6 years ago

vikramrojo commented 6 years ago

Current assembly is container > row > col but could be simplified to two layers row > col, see https://github.com/jgthms/bulma/blob/master/sass/grid/columns.sass

vikramrojo commented 6 years ago

@winkerVSbecks do you have a preference using .cols > .col over the usual .container > .row > .col as there are advantages to both, with cols there's lest nesting but you can also just use .container without an inner element. Note: Fortune uses flexbox for columns & has grid utility classes as well.

winkerVSbecks commented 6 years ago

I personally prefer .cols > .col. I find that container is generally just responsible for controlling max-width, centring content, etc. and has no impact over the grid. This would make it easy to create a nested grid too.

vikramrojo commented 6 years ago

Need to account for nested cols

.cols .cols {
  width: auto;
  margin-left: calc(var(--column-gutter) / -2);
  margin-right: calc(var(--column-gutter) / -2);
}