/* ------------------------------------------------------------------------ *\
   mixins.util.column
\* ------------------------------------------------------------------------ */


/**
 * [set description]
 * @param {[type]} cols [description]
 */
u-column--set(cols = 100)
  if cols != nix.grid.cols
    float: left

  position: relative
  top: 0
  left: 0
  padding-right: nix.grid.gutter
  padding-left: nix.grid.gutter
  min-height: 1px


/**
 * [column description]
 * @param  {[type]} cols       [description]
 * @param  {[type]} breakpoint =             null [description]
 * @return {[type]}            [description]
 */
u-column(cols, breakpoint = null)
  if breakpoint != null
    +above(nix.mq[breakpoint])
      u-column--set(cols)
      u-column--width(cols)

  else
    u-column--set(cols)
    u-column--width(cols)


/**
 * [last description]
 * @param  {[type]} nth [description]
 * @return {[type]}     [description]
 */
u-column--last(nth)
  &:nth-child({nth})
    clear: left


/**
 * [equal description]
 * @return {[type]} [description]
 */
u-column--equal() // @TODO doesn't work with jeet cols
  / __getParent()
      overflow-y: hidden
  &
    margin-bottom: -9999px
    padding-bottom: 9999px
    height: 100%


/**
 * [column-width description]
 * @param  {[type]} number-of-columns [description]
 * @return {[type]}                   [description]
 */
u-column--width(number-of-columns)
  width: number-of-columns / 100 * 100%


/**
 * [width-fractional description]
 * @param  {[type]} numerator   [description]
 * @param  {[type]} denominator [description]
 * @return {[type]}             [description]
 */
u-column--width--fractional(numerator, denominator)
  width: numerator / denominator * 100%


/**
 * [offset description]
 * @param {[type]} number-of-columns [description]
 */
u-column--offset(number-of-columns)
  margin-left: number-of-columns / 100 * 100%


/**
 * [offset-fractional description]
 * @param  {[type]} numerator   [description]
 * @param  {[type]} denominator [description]
 * @return {[type]}             [description]
 */
u-column--offset--fractional(numerator, denominator)
  margin-left: numerator / denominator * 100%


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-5(breakpoint)
  u-column(5, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-10(breakpoint)
  u-column(10, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-15(breakpoint)
  u-column(15, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-20(breakpoint)
  u-column(20, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-25(breakpoint)
  u-column(25, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-30(breakpoint)
  u-column(30, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-33(breakpoint)
  u-column(33.3333, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-35(breakpoint)
  u-column(35, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-40(breakpoint)
  u-column(40, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-45(breakpoint)
  u-column(45, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-50(breakpoint)
  u-column(50, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-55(breakpoint)
  u-column(55, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-60(breakpoint)
  u-column(60, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-65(breakpoint)
  u-column(65, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-66(breakpoint)
  u-column(66.6666, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-70(breakpoint)
  u-column(70, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-75(breakpoint)
  u-column(75, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-80(breakpoint)
  u-column(80, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-85(breakpoint)
  u-column(85, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-90(breakpoint)
  u-column(90, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-95(breakpoint)
  u-column(95, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--width-100(breakpoint)
  u-column(100, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-5(breakpoint)
  u-column--offset(5, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-10(breakpoint)
  u-column--offset(10, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-15(breakpoint)
  u-column--offset(15, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-20(breakpoint)
  u-column--offset(20, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-25(breakpoint)
  u-column--offset(25, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-30(breakpoint)
  u-column--offset(30, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-33(breakpoint)
  u-column--offset(33.3333, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-35(breakpoint)
  u-column--offset(35, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-40(breakpoint)
  u-column--offset(40, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-45(breakpoint)
  u-column--offset(45, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-50(breakpoint)
  u-column--offset(50, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-55(breakpoint)
  u-column--offset(55, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-60(breakpoint)
  u-column--offset(60, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-65(breakpoint)
  u-column--offset(65, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-66(breakpoint)
  u-column--offset(66.6666, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-70(breakpoint)
  u-column--offset(70, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-75(breakpoint)
  u-column--offset(75, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-80(breakpoint)
  u-column--offset(80, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-85(breakpoint)
  u-column--offset(85, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-90(breakpoint)
  u-column--offset(90, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-95(breakpoint)
  u-column--offset(95, breakpoint)


/**
 * [description]
 * @param  {[type]} breakpoint [description]
 * @return {[type]}            [description]
 */
u-column--offset-100(breakpoint)
  u-column--offset(100, breakpoint)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--1-1()
  u-column--set()
  u-column--width--fractional(1, 1)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--1-2()
  u-column--set()
  u-column--width--fractional(1, 2)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--1-3()
  u-column--set()
  u-column--width--fractional(1, 3)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--2-3()
  u-column--set()
  u-column--width--fractional(2, 3)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--1-4()
  u-column--set()
  u-column--width--fractional(1, 4)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--3-4()
  u-column--set()
  u-column--width--fractional(3, 4)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--1-5()
  u-column--set()
  u-column--width--fractional(1, 5)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--2-5()
  u-column--set()
  u-column--width--fractional(2, 5)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--3-5()
  u-column--set()
  u-column--width--fractional(3, 5)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--4-5()
  u-column--set()
  u-column--width--fractional(4, 5)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--offest-1-2()
  u-column--offset--fractional(1, 2)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--offest-1-3()
  u-column--offset--fractional(1, 3)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--offest-2-3()
  u-column--offset--fractional(2, 3)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--offest-1-4()
  u-column--offset--fractional(1, 4)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--offest-3-4()
  u-column--offset--fractional(3, 4)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--offest-1-5()
  u-column--offset--fractional(1, 5)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--offest-2-5()
  u-column--offset--fractional(2, 5)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--offest-3-5()
  u-column--offset--fractional(3, 5)


/**
 * [description]
 * @return {[type]} [description]
 */
u-column--offest-4-5()
  u-column--offset--fractional(4, 5)
