/modules/_col.styl

Parents

.sec
  float left
  width 100%

.wrap
  @extend .cf
  mgn(0,auto)
  max-width $width*1em
  pad(0,1,0)
  width 100%
      

.x-n-col

        .one-col
  float left
  padding-left $gut*1em
  padding-right $gut*1em
  width 100%

col(x,n)
  @extend .one-col

  +bp('mM')
    if x == 1
      if even(n)
        width ((x*100%)/(n/2))

      if odd(n)
        width ((x*100%)/((n + 1)/2))

    if x > 1
      if x == (n - 1)
        width 100%

      else
        if even(x)
          if even(n)
            width (((x/2)*100%)/(n/2))

          if odd(n)
            width (((x/2)*100%)/((n + 1)/2))

        if odd(x)
          if even(n)
            width ((((x + 1)/2)*100%)/(n/2))

          if odd(n)
            width ((((x + 1)/2)*100%)/((n + 1)/2))

  +bp('mT')
    width ((x*100%)/n)

  +bp('p')
    width ((x*100%)/n)

.two-col
  col(1,2)

.three-col
  col(1,3)

.two-three-col
  col(2,3)

.four-col
  col(1,4)

.three-four-col
  col(3,4)

.six-col
  col(1,6)

.five-six-col
  col(5,6)
      

Modifers

        .clear-col.clear-col
  float none
  padding-left $gut*1em
  padding-right $gut*1em

.noPad.noPad
  padding-left 0
  padding-right 0

.col-cl.col-cl
  clear left

.col-cr.col-cr
  clear right

.col-c.col-c
  clear both
  float none
  margin-left auto
  margin-right auto

.col-r.col-r
  float right

.align-c.align-c
  text-align center

.align-r.align-r
  text-align right