function paddingFromString(string) {
  if (!string || string == '')
    return null

  var expressionSplit = string.split(expressionSpliter)
  var paddingValues = expressionSplit[0]

  expressionSplit.shift()

  var conditions = evaluateConditionsFromString(expressionSplit.join(expressionSpliter))

  var values = paddingValues.split(paddingValuesSplitter)

  // Remove empty strings
  values = values.filter(function(value) {
    return value != ''
  })

  // If any value is 'invalid' then return null
  var invalidInput = values.find(function(value) {
    return !(parseFloat(value).toString() == value || value == 'x')
  })

  if (invalidInput) {
    log(2, 'Padding is invalid', string)
    return null
  }

  var top = bottom = left = right = 0

  switch (values.length) {
    case 1:
      top = bottom = left = right = values[0]
      break
    case 2:
      top = bottom = values[0]
      left = right = values[1]
      break
    case 3:
      top = values[0]
      left = right = values[1]
      bottom = values[2]
      break
    case 4:
      top = values[0]
      right = values[1]
      bottom = values[2]
      left = values[3]
    default:
      break
  }

  var padding = {
    top: top,
    bottom: bottom,
    left: left,
    right: right
  }

  if (conditions) {
    padding.conditions = conditions
  }

  return padding
}
Given a string e.g. '20 30 10'
Convert it to a padding object