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

2.0.2 wip #2143

Merged
merged 2 commits into from Feb 21, 2012
Merged

2.0.2 wip #2143

merged 2 commits into from Feb 21, 2012

Conversation

inmarelibero
Copy link
Contributor

This PR aims to let the user choose a number of columns up to 24, keeping the default to 12.

Column width of fixed and fluid layout are calculated in mixins.less, through grid.less and (optional) responsive.less

The final objective is to be able to build a fully working fixed/fluid layout with a custom number of columns (between 1 and 24, with 12 as default) only editing variables in

variables.less

@inmarelibero
Copy link
Contributor Author

in last commit in responsive.less I substituted

12

with

@gridColumns

Being so, .spanand .offset classes are correctly built, but layout does not work properly, because changing the number of columns changes also the total width.

if this PR is good, I'll then propose a solution for

#gridSystem > .generate(@gridColumns, 70px, 30px);

when

@gridColumns

is != 12

@inmarelibero
Copy link
Contributor Author

my solution consists in calculating a multiplying coefficient based on the (optionally) different number of columns:

@media (min-width: 1200px) {

    @coefficientDifferentColumns = 12/@gridColumns;

    [...]

    // Fixed grid
    #gridSystem > .generate(
        @gridColumns,
        70px * @coefficientDifferentColumns,
        30px * @coefficientDifferentColumns
    );

    [...]
}

but I think it's better to open another PR for this and far from being a perfect solution imho :)

mdo added a commit that referenced this pull request Feb 21, 2012
Add columns 13-24 for grid systems to enable customization up to 24 cols
@mdo mdo merged commit 575072b into twbs:2.0.2-wip Feb 21, 2012
@srhise
Copy link

srhise commented Apr 25, 2012

Thanks a million guys. I just got into another project that of course the designer went with a 24 column grid and I was hoping this would work - which it did in the new version perfectly. win!

stempler pushed a commit to stempler/bootstrap that referenced this pull request Apr 11, 2014
Add columns 13-24 for grid systems to enable customization up to 24 cols
stempler pushed a commit to stempler/bootstrap that referenced this pull request Nov 4, 2014
Add columns 13-24 for grid systems to enable customization up to 24 cols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants