Reputation: 2000
I'm building a website using susy fluid grid container. But some of my interface elements require fixed width. So having these settings:
$susy: (
columns: 12,
container: rem-calc(1680),
gutters: 28px/112px,
global-box-sizing: border-box,
gutter-position: split
);
I would like to easly get for example 8 column span, but staticly. So @include span(8 of 12) would result with precentage value, which is fine, but in certain cases I'd like to get the static value (based on container fixed max width ofcourse).
Is it possible?
Upvotes: 0
Views: 456
Reputation: 14010
Yes - you can pass in static
as an argument for any Susy function or mixin where you want static output — @include span(8 of 12 static)
— as long as you have a column-width
or container
set. (don't set both, or there's potential for conflicts)
update: oh, I see this was mentioned in a comment above...
Upvotes: 0
Reputation: 404
In your susy global settings above you can add:
math: static
But in order to do so you need to include the column-width object as well.
So let's say you want to have each column with 40px width, using your example it goes like this:
$susy: (
columns: 12,
...
math: static,
column-width: 40px
);
When you do @include span
instead of using % basis, it will use px base which as you want it as static.
Upvotes: 1