gss / parser

Constraint Cascading Style Sheets compiler
MIT License
48 stars 6 forks source link

Issue with placement of top & left in this code #43

Open trevorobrien opened 9 years ago

trevorobrien commented 9 years ago

having top & left defined in the middle of this block of code causes a column out of range error - if you move them to the top of the code block then its fine.

section {
  width: <= $taylorW / 2;
}

shift-x = 1md;
shift-y = 0.5md;

v-gutter-min: = 1md;
v-gutter-max: = 5md;

h-gutter: = 0;

h-gutter-left == h-gutter / 8;
h-gutter-right == h-gutter-left;
h-gutter-middle == h-gutter;

h-gutter: = 4md;

//col 2
section.left {
  left: == ^left + ^h-gutter-left;
  right: == ^center-x - ^h-gutter-middle / 2;
}
section.right {
  left: == ^center-x + ^h-gutter-middle / 2;
  right: == ^right - ^h-gutter-right;
}

//rowtop
top: == 0 !require;
left: == 0 !require;

section {

  height: == article[height] !require;

  top: >= ^top !require;
  bottom: <= ^bottom !require;

  slack-gap: >= ^v-gutter-min !require;
  slack-gap: <= ^v-gutter-max !strong;

 }

section.left {
  + section.right {
    top: == ^top !require;
  }
  + aside + section.right {
    top: == ^top !require;
  }
}

section.left {
  top: == :previous[bottom] + &slack-gap !require;
}
section.right {
  top: == :previous[bottom] + &slack-gap !require;
}

//last row bottom

section.left {
  :last[bottom] == ^bottom !strong;
}
section.right {
  :last[bottom] == ^bottom !strong;
}