getMargin method

String getMargin()

It'll provide CSS margin code.

Implementation

String getMargin() {
  if (all != null) {
    return "margin:${getSizeWithUnit(all, sizeUnit)};";
  } else if (zeroAuto != null) {
    return "margin:$zeroAuto;";
  } else {
    return """margin:${getSizeWithUnit(top, sizeUnit)} ${getSizeWithUnit(right, sizeUnit)} ${getSizeWithUnit(bottom, sizeUnit)} ${getSizeWithUnit(left, sizeUnit)};""";
  }
}