nested loops won't compile

paul.schlereth's Avatar

paul.schlereth

04 May, 2012 09:19 PM

can anyone help me figure out why this won't compile? I have a feeling the problem is:

.childSpanX(@parentIndex, @childIndex: 1) when (@childIndex < @parentIndex) // but i don't know why

`//added to bootstrap mixins.less

//variables
@gridColumns:             12;
@gridColumnWidth:      60px;
@gridGutterWidth:         20px;

.childSpanX(@parentIndex, @childIndex: 1) when (@childIndex < @parentIndex)
{
  (~"> .span@{childIndex}")
  {
    .childSpan(@parentIndex, @childIndex);
  }
  .childSpanX(@parentIndex, @childIndex + 1);  // recurse
}
// fallback
.childSpanX(0) {}

.parentSpanX(@parentIndex) when (@parentIndex > 0)
{
  (~".span@{parentIndex} > .row-fluid")
  {
    .childSpanX(@parentIndex); //call child fcn
  }
  .parentSpanX(@parentIndex - 1);  // recurse
}
// fallback to "break" the loop and avoid errors for no-match
.parentSpanX(0) {}


// output fcn
.childSpan (@parentColumns, @childColumns)
{
  @parentSpanPixelWidth: (@gridColumnWidth * @parentColumns) + (@gridGutterWidth * (@parentColumns - 1));
  @childSpanPixelWidth: (@gridColumnWidth * @childColumns) + (@gridGutterWidth * (@childColumns - 1));
  width: percentage(@childSpanPixelWidth / @parentSpanPixelWidth);
}

//after .row-fluid {}

.parentSpanX(@gridColumns);`

// trying to output:

.span11 > .row-fluid > .span1 { width: x%; } .span11 > .row-fluid > .span2 { width: xx%; } .span11 > .row-fluid > .span3 { width: xxx%; } etc
... .span10 > .row-fluid > .span1 { width: x%; } ... .span9 > .row-fluid > .span1 { width: x%; } etc

  1. 1 Posted by ReinnaceamB on 21 Aug, 2012 12:37 AM

    ReinnaceamB's Avatar

    Je suis un homme qui recherche une femme pour fonder une famille porn sex movies un homme et une femme se masturbent chacun leur tour pour se donner du plaisir http://adultevideotribe.com/ je faillis crier, mais le morceau de glace que je glissais dans ma bouche calma ma surprise leighton meester sex tape entre, et passe à droite, que je referme...

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac