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

Having @grid-columns variable inside grid-framework mixins prevents simultaneous grid systems #13428

Closed
Jaska opened this issue Apr 25, 2014 · 3 comments
Labels

Comments

@Jaska
Copy link

Jaska commented Apr 25, 2014

12 -span columns is great for nearly all cases - except creating 5 column layouts.

But I can't create a 10 column system without deleting the 12 column one. And the reason is mainly because @grid-column -variable is called inside the https://github.com/twbs/bootstrap/blob/master/less/mixins/grid-framework.less -mixins.

If @grid-column was passed to the mixin as the default value parameter then creating both 12 and 10 (and whatever) column systems would be easy.

Like instead of this:

.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
  .col-@{class}-@{index} {
    width: percentage((@index / @grid-columns));
  }
}

It would be:

.calc-grid-column(@index, @class, @type, @grid-column-count: @grid-columns) when (@type = width) and (@index > 0) {
  .col-@{class}-@{index} {
    width: percentage((@index / @grid-column-count));
  }
}

I already got it to work (SASS version) and I think this would be a logical addition.

@cvrebert cvrebert added css and removed feature labels Apr 25, 2014
@cvrebert
Copy link
Collaborator

Semi-duplicate of #11322. But personally I like the idea.

@cvrebert cvrebert modified the milestones: v3.3.0, v3.2.1 Jun 9, 2014
@mdo
Copy link
Member

mdo commented Jun 11, 2014

Per #11322, still probably not going to support this. I don't see much of a use case in the ability to create two or more separate grid systems. That said, it's a small enough change that folks could utilize if they were crazy enough to do so, so if someone wants to open a PR, I'll check it out.

@mdo mdo closed this as completed Jun 11, 2014
@mdo mdo removed this from the v3.2.1 milestone Jun 11, 2014
@Jaska
Copy link
Author

Jaska commented Jun 11, 2014

Ok! Thanks for the feedback.

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

No branches or pull requests

3 participants