removeShorthandMargin static method

void removeShorthandMargin(
  1. CSSStyleDeclaration style, [
  2. bool? isImportant
])

Implementation

static void removeShorthandMargin(CSSStyleDeclaration style, [bool? isImportant]) {
  if (style.contains(MARGIN_LEFT)) style.removeProperty(MARGIN_LEFT, isImportant);
  if (style.contains(MARGIN_TOP)) style.removeProperty(MARGIN_TOP, isImportant);
  if (style.contains(MARGIN_RIGHT)) style.removeProperty(MARGIN_RIGHT, isImportant);
  if (style.contains(MARGIN_BOTTOM)) style.removeProperty(MARGIN_BOTTOM, isImportant);
}