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

Flexible percentage based grids with fixed pixel gutters #20

Open
Rolf-Herbert opened this issue Jan 7, 2021 · 0 comments
Open

Flexible percentage based grids with fixed pixel gutters #20

Rolf-Herbert opened this issue Jan 7, 2021 · 0 comments

Comments

@Rolf-Herbert
Copy link

Hi there,

Not an issue as such just a modification I have added to enable a fluid grid to have fixed gutters..this relies on calc so IE9 up.

.grid-column-width(@n) {
//width: @column-width * @n - (@column-margin*(@total-columns - @n)/@total-columns);
width: calc( ~ "@{column-width}% * @{n} - ( @{global-gutter} - ( (@{global-gutter} / @{total-columns}) * @{n} ) ) ");
}

and

.column,
.columns {
    //margin-left: @column-margin;
    margin-left: @global-gutter;
}

Need to provide the @global-gutter variable in PX and also
You also need an uptodate less compiler so that it does not perform the calculation inside the calc brackets.

Just thought it might be useful to some people.

Thanks
Rolf

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

No branches or pull requests

1 participant