Petr Illek
Petr Illek

Reputation: 121

singularity column width without floating

I've 12 columns grid setup using singularity. Many times I'm looking for a simple variable of column width. I can use grid-span(), but it involves margins and floats. Is there any mixin/function which will return only column width in %? I'm searching for this for two days without any success. I found only span-columns(x, y); but it does not work.

Thanks for pointing to a direction.

EDIT: solution found

It was my mistake trying to use column-span (https://github.com/Team-Sass/Singularity/wiki/Grid-Helpers#column-span) as a mixin with @include. Correct use is for example:

width: column-span(2, 6); //width will be set to 2 columns at six position.

Upvotes: 2

Views: 513

Answers (1)

Petr Illek
Petr Illek

Reputation: 121

Solution found

It was my mistake trying to use column-span (https://github.com/Team-Sass/Singularity/wiki/Grid-Helpers#column-span) as a mixin with @include. Correct use is for example:

width: column-span(2, 6); //width will be set to 2 columns at six position.

Upvotes: 1

Related Questions