ChristianPeters / crispy-grid

A Compass-based Grid that strives for lean & sane CSS and supports complex layouts
MIT License
10 stars 2 forks source link

Add offsets #11

Open lucasdinonolte opened 10 years ago

lucasdinonolte commented 10 years ago

Ermöglicht Offsets einzelner Spalten innerhalb des Grids.

Der Branch ist noch von letztem Jahr. Hatte damals keinen PR erstellt... Brauche das Feature jetzt aber, habe darum mal den alten Branch genommen und einfach einen PR aufgemacht, damit du schon mal vorbereitet bist... Konflikte löse ich noch...

ChristianPeters commented 10 years ago

Hey Lucas,

could you provide an example usage for that feature?

I am asking because the current recommended way of adding space between two columns is setting a respective gutter on the preceding column. And in case of the first column, you might want to spend the container some padding.

lucasdinonolte commented 10 years ago

The offset mixin just provides a quick way to add a colspan-sized gutter to a column.

So +offset(1) does basically the same as `+column(…, $left-gutter: colspan-to-width(1))``

Writing this, I just realized, I'm not utilizing the $left-gutter variable in my offset code. I will change it accordingly so it's really just a shorthand

ChristianPeters commented 10 years ago

Indeed.

Still, I just wanted to know why you need a left margin anyway.

_Christian