Malyo
Malyo

Reputation: 2000

Susy counts column width and gutters wrong

My susy layout is wrong by 1 pixel and I don't know why:

$susy: (
  columns: 12,
  container: 1546px,
  gutter: 26px,
  column-width: 105px,
  global-box-sizing: border-box
);

It returns 104px width columns with 27px gutters, the container is as set. Any pointers?

Upvotes: 0

Views: 182

Answers (1)

Miriam Suzanne
Miriam Suzanne

Reputation: 14010

There are a few issues here:

  • The gutters setting (plural) takes a ratio, rather than a length. To get your proper ratio based on the length, you can use division: gutters: 26px/105px
  • By default, Susy output is in relative %, even if you define the grid using px. If you want Susy to output exact px-lengths, you should add math: static to your settings. In that case, you should also remove your container size, and let Susy calculate that for you based on columns and gutters.

Upvotes: 1

Related Questions